Skip to content

Commit

Permalink
Add missing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
eriknyquist committed Oct 13, 2023
1 parent 74898db commit cb3ad79
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/test_duckargs.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,14 @@ def test_env_all(self):
os.environ["DUCKARGS_PRINT"] = "0"
self._run_test("env_all")

def test_invalid_env_print(self):
os.environ["DUCKARGS_PRINT"] = "ksfensik"
self.assertRaises(RuntimeError, generate_python_code, ['duckargs', '-a'])

def test_invalid_env_comment(self):
os.environ["DUCKARGS_COMMENT"] = "ksfensik"
self.assertRaises(RuntimeError, generate_python_code, ['duckargs', '-a'])

def test_duplicate_names(self):
self.assertRaises(ValueError, generate_python_code, ['duckargs', '-a', '-a'])
self.assertRaises(ValueError, generate_python_code, ['duckargs', '-a', '-b', '-a'])
Expand Down

0 comments on commit cb3ad79

Please sign in to comment.