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

Unit Testing pycaw.magic #45

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

TurboAnonym
Copy link
Contributor

@AndreMiras not yet ready 😁
just starting the discussion ...

I have thought about how to add unit testing:

  • so far i tested the code visually with my GUI Magic Session Mixer
    that was working for me, but of course its nowhere an automatic solution. (Also it doesnt test MagicApp)
  • What about uploading a free to use sound file to the test folder and use the vlc media player to play it. Then change volume and "assert" expected feedback? We could also use taskkill /F /IM vlc.exe to just kill all open vlc windows. VLC has the characteristic, that every new app window will create a new WAS (session). That way we could easily stress test pycaw (Opening a lot of windows and closing them all instantly).

Im proposing to use vlc since i cant find any other nice crossplattform solution (win 7 - 10)

  • What wont work:

    Internet Explorer:

    • start iexplore music.mp3 or any other file format will download the file
    • <audio autoplay="autoplay"><source src="music.mp3" /></audio> a simple website wont work either: Problem

    Windows Media Player:

    • behaves just weird in terms of sessions - probably because its so old.

What could work:

  • VLC media player (-needs to be installed)
  • Powershell to play .wav link (-is ugly and I could not kill the session besides using taskkill /F /IM powershell.exe what could also interfere with the unit testing)
  • Some python pip library? ...

AndreMiras added a commit that referenced this pull request Apr 18, 2022
We're only constructing the object for now
AndreMiras added a commit that referenced this pull request Apr 18, 2022
We're only constructing the object for now
AndreMiras added a commit that referenced this pull request Apr 18, 2022
AndreMiras added a commit that referenced this pull request Apr 18, 2022
AndreMiras added a commit that referenced this pull request Apr 18, 2022
AndreMiras added a commit that referenced this pull request Apr 18, 2022
AndreMiras added a commit that referenced this pull request Apr 18, 2022
AndreMiras added a commit that referenced this pull request Apr 18, 2022
AndreMiras added a commit that referenced this pull request Apr 18, 2022
AndreMiras added a commit that referenced this pull request Apr 18, 2022
AndreMiras added a commit that referenced this pull request Apr 18, 2022
AndreMiras added a commit that referenced this pull request Apr 18, 2022
@AndreMiras
Copy link
Owner

FYI I've added a few dumb (and maybe flaky) tests in tests/test_magic.py for a start

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

Successfully merging this pull request may close these issues.

2 participants