-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #23 from iluvcapra/maint-rm-umid
Removed UMID parsing for now, to improve test coverage
- Loading branch information
Showing
3 changed files
with
53 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import unittest | ||
|
||
from unittest.mock import patch | ||
|
||
from wavinfo.__main__ import main | ||
|
||
import sys | ||
import glob | ||
|
||
class MainTest(unittest.TestCase): | ||
|
||
def test_empty_argv(self): | ||
with patch.object(sys, 'argv', []): | ||
try: | ||
main() | ||
except: | ||
self.fail("main() throwing an exception") | ||
|
||
def test_a_file(self): | ||
for path in glob.glob("tests/test_files/**/*.wav"): | ||
with patch.object(sys, 'argv', ["TEST", path]): | ||
try: | ||
main() | ||
except: | ||
self.fail("main() throwing an exception") | ||
|
||
def test_ixml(self): | ||
with patch.object(sys, 'argv', | ||
['TEST', '--ixml', 'tests/test_files/sounddevices/A101_1.WAV']): | ||
try: | ||
main() | ||
except: | ||
self.fail("main() throwing an exception") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters