Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test_audio_endpoint_volume_example failing #65

Open
AndreMiras opened this issue Apr 16, 2022 · 0 comments
Open

test_audio_endpoint_volume_example failing #65

AndreMiras opened this issue Apr 16, 2022 · 0 comments

Comments

@AndreMiras
Copy link
Owner

The tests/test_examples.py::TestExamples::test_audio_endpoint_volume_example is failing

PS C:\Users\vagrant\Documents\pycaw> venv\scripts\pytest tests\test_examples.py::TestExamples::test_audio_endpoint_volume_example 
=========================================================================================================== test session starts ===========================================================================================================
platform win32 -- Python 3.10.4, pytest-7.1.1, pluggy-1.0.0
rootdir: C:\Users\vagrant\Documents\pycaw
collected 1 item

tests\test_examples.py F                                                                                                                                                                                                             [100%]

================================================================================================================ FAILURES =================================================================================================================
_____________________________________________________________________________________________ TestExamples.test_audio_endpoint_volume_example _____________________________________________________________________________________________

self = <tests.test_examples.TestExamples testMethod=test_audio_endpoint_volume_example>

    def test_audio_endpoint_volume_example(self):
        with captured_output() as (out, err):
            audio_endpoint_volume_example.main()
        output = out.getvalue()
        lines = output.split("\n")
        self.assertEqual(
            lines[0], 'volume.GetMute(): 0')
        self.assertEqual(
            lines[1], 'volume.GetMasterVolumeLevel(): -20.0')
>       self.assertEqual(
            lines[2], 'volume.GetVolumeRange(): (-95.25, 0.0, 0.75)')
E       AssertionError: 'volume.GetVolumeRange(): (-96.0, 0.0, 1.5)' != 'volume.GetVolumeRange(): (-95.25, 0.0, 0.75)'
E       - volume.GetVolumeRange(): (-96.0, 0.0, 1.5)
E       ?                             ^ ^       ^
E       + volume.GetVolumeRange(): (-95.25, 0.0, 0.75)
E       ?                             ^ ^^       ^ +

tests\test_examples.py:39: AssertionError
========================================================================================================= short test summary info =========================================================================================================
FAILED tests/test_examples.py::TestExamples::test_audio_endpoint_volume_example - AssertionError: 'volume.GetVolumeRange(): (-96.0, 0.0, 1.5)' != 'volume.GetVolumeRange(): (-95.25, 0.0, 0.75)'
============================================================================================================ 1 failed in 0.11s ============================================================================================================
PS C:\Users\vagrant\Documents\pycaw>
AndreMiras added a commit that referenced this issue Apr 16, 2022
Install a virtual network sound card for the CI tests.
Fix `test_device_failed_properties` test as well.
Start migrating to `pytest`.

The `test_audio_endpoint_volume_example` test is failing still, refs #65
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant