This commit is contained in:
2026-09-17 11:15:09 -07:00
parent 7d5bb29a42
commit 6f5cb795a3
10 changed files with 100 additions and 116 deletions
+3 -12
View File
@@ -9,24 +9,15 @@ from wavinfo.__main__ import main
class MainTest(unittest.TestCase):
def test_empty_argv(self):
with patch.object(sys, "argv", []):
try:
main()
except Exception as e:
self.fail(f"main() throwing an exception: {e}")
main()
def test_a_file(self):
for path in glob.glob("tests/test_files/**/*.wav"):
with patch.object(sys, "argv", ["TEST", path]):
try:
main()
except Exception as e:
self.fail(f"main() throwing an exception: {e}")
main()
def test_ixml(self):
with patch.object(
sys, "argv", ["TEST", "--ixml", "tests/test_files/sounddevices/A101_1.WAV"]
):
try:
main()
except Exception as e:
self.fail(f"main() throwing an exception: {e}")
main()