Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • P PyAV
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 37
    • Issues 37
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 26
    • Merge requests 26
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • PyAV
  • PyAV
  • Issues
  • #833
Closed
Open
Issue created Dec 09, 2021 by Administrator@rootContributor

testsuite fails 5 tests on s390x

Created by: jonassmedegaard

Debian build fails testsuite on hardware architecture s390x:

=================================== FAILURES ===================================
_______________ TestAudioFrameConveniences.test_basic_to_ndarray _______________

self = <tests.test_audioframe.TestAudioFrameConveniences testMethod=test_basic_to_ndarray>

    def test_basic_to_ndarray(self):
        frame = AudioFrame(format='s16p', layout='stereo', samples=160)
        array = frame.to_ndarray()
>       self.assertEqual(array.dtype, '<i2')
E       AssertionError: dtype('int16') != '<i2'

tests/test_audioframe.py:84: AssertionError
_________________ TestAudioFrameConveniences.test_ndarray_s16 __________________

self = <tests.test_audioframe.TestAudioFrameConveniences testMethod=test_ndarray_s16>

    def test_ndarray_s16(self):
        layouts = [
            ('s16', 'mono', '<i2', (1, 160)),
            ('s16', 'stereo', '<i2', (1, 320)),
            ('s16p', 'mono', '<i2', (1, 160)),
            ('s16p', 'stereo', '<i2', (2, 160)),
        ]
        for format, layout, dtype, size in layouts:
            array = numpy.random.randint(0, 256, size=size, dtype=dtype)
>           frame = AudioFrame.from_ndarray(array, format=format, layout=layout)

tests/test_audioframe.py:143: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

>   ???
E   AssertionError

av/audio/frame.pyx:120: AssertionError
_____________ TestAudioFrameConveniences.test_ndarray_s16p_align_8 _____________

self = <tests.test_audioframe.TestAudioFrameConveniences testMethod=test_ndarray_s16p_align_8>

    def test_ndarray_s16p_align_8(self):
        frame = AudioFrame(format='s16p', layout='stereo', samples=159, align=8)
        array = frame.to_ndarray()
>       self.assertEqual(array.dtype, '<i2')
E       AssertionError: dtype('int16') != '<i2'

tests/test_audioframe.py:152: AssertionError
_________________ TestAudioFrameConveniences.test_ndarray_s32 __________________

self = <tests.test_audioframe.TestAudioFrameConveniences testMethod=test_ndarray_s32>

    def test_ndarray_s32(self):
        layouts = [
            ('s32', 'mono', '<i4', (1, 160)),
            ('s32', 'stereo', '<i4', (1, 320)),
            ('s32p', 'mono', '<i4', (1, 160)),
            ('s32p', 'stereo', '<i4', (2, 160)),
        ]
        for format, layout, dtype, size in layouts:
            array = numpy.random.randint(0, 256, size=size, dtype=dtype)
>           frame = AudioFrame.from_ndarray(array, format=format, layout=layout)

tests/test_audioframe.py:164: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

>   ???
E   AssertionError

av/audio/frame.pyx:120: AssertionError
_________________ TestFilters.test_audio_buffer_volume_filter __________________

self = <tests.test_filters.TestFilters testMethod=test_audio_buffer_volume_filter>

    def test_audio_buffer_volume_filter(self):
        graph = Graph()
        self.link_nodes(
            graph.add_abuffer(
                format='fltp',
                sample_rate=48000,
                layout='stereo',
                time_base=Fraction(1, 48000)
            ),
            graph.add('volume', volume='0.5'),
            graph.add('abuffersink')
        )
        graph.configure()
    
        input_frame = generate_audio_frame(0, input_format='fltp', layout='stereo', sample_rate=48000)
        graph.push(input_frame)
    
        out_frame = graph.pull()
        self.assertEqual(out_frame.format.name, 'fltp')
        self.assertEqual(out_frame.layout.name, 'stereo')
        self.assertEqual(out_frame.sample_rate, 48000)
    
        input_data = input_frame.to_ndarray()
        output_data = out_frame.to_ndarray()
    
>       self.assertTrue(np.allclose(input_data * 0.5, output_data), "Check that volume is reduced")
E       AssertionError: False is not true : Check that volume is reduced

tests/test_filters.py:215: AssertionError
=============================== warnings summary ===============================
.pybuild/cpython3_3.9/build/tests/test_audioframe.py::TestAudioFrameConveniences::test_ndarray_s16
  /<<PKGBUILDDIR>>/.pybuild/cpython3_3.9/build/tests/test_audioframe.py:142: DeprecationWarning: Providing a dtype with a non-native byteorder is not supported. If you require platform-independent byteorder, call byteswap when required.
  In future version, providing byteorder will raise a ValueError
    array = numpy.random.randint(0, 256, size=size, dtype=dtype)

.pybuild/cpython3_3.9/build/tests/test_audioframe.py::TestAudioFrameConveniences::test_ndarray_s32
  /<<PKGBUILDDIR>>/.pybuild/cpython3_3.9/build/tests/test_audioframe.py:163: DeprecationWarning: Providing a dtype with a non-native byteorder is not supported. If you require platform-independent byteorder, call byteswap when required.
  In future version, providing byteorder will raise a ValueError
    array = numpy.random.randint(0, 256, size=size, dtype=dtype)

-- Docs: https://docs.pytest.org/en/stable/warnings.html
=========================== short test summary info ============================
FAILED tests/test_audioframe.py::TestAudioFrameConveniences::test_basic_to_ndarray
FAILED tests/test_audioframe.py::TestAudioFrameConveniences::test_ndarray_s16
FAILED tests/test_audioframe.py::TestAudioFrameConveniences::test_ndarray_s16p_align_8
FAILED tests/test_audioframe.py::TestAudioFrameConveniences::test_ndarray_s32
FAILED tests/test_filters.py::TestFilters::test_audio_buffer_volume_filter - ...
===== 5 failed, 108 passed, 8 skipped, 43 deselected, 2 warnings in 0.71s ======

Full build log: https://buildd.debian.org/status/fetch.php?pkg=python-av&arch=s390x&ver=8.0.3-1&stamp=1629313788&raw=0

Assignee
Assign to
Time tracking