Skip to content

Commit

Permalink
Added unit test for __main__
Browse files Browse the repository at this point in the history
  • Loading branch information
iluvcapra committed Nov 8, 2023
1 parent 0952337 commit b0a4454
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tests/test_main.py
Original file line number Diff line number Diff line change
@@ -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")

Check warning on line 16 in tests/test_main.py

View check run for this annotation

Codecov / codecov/patch

tests/test_main.py#L15-L16

Added lines #L15 - L16 were not covered by tests

0 comments on commit b0a4454

Please sign in to comment.