mirror of
https://github.com/iluvcapra/wavinfo.git
synced 2025-12-31 08:50:41 +00:00
Added unit test for __main__
This commit is contained in:
17
tests/test_main.py
Normal file
17
tests/test_main.py
Normal file
@@ -0,0 +1,17 @@
|
||||
import unittest
|
||||
|
||||
from unittest.mock import patch
|
||||
|
||||
from wavinfo.__main__ import main
|
||||
|
||||
import sys
|
||||
|
||||
class MainTest(unittest.TestCase):
|
||||
|
||||
def test_empty_argv(self):
|
||||
with patch.object(sys, 'argv', []):
|
||||
try:
|
||||
main()
|
||||
except:
|
||||
self.fail("main() throwing an exception")
|
||||
|
||||
Reference in New Issue
Block a user