Skip to content

Commit a0c7b87

Browse files
committed
Add a case of no argument at all
1 parent 9de6384 commit a0c7b87

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tests/test_cli.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,17 @@ def test_cli_main(self):
1414
__main__.main()
1515
self.assertEqual(ex.exception.code, 2)
1616

17-
self.assertIsNone(__main__.main(["thainlp", "data", "path"]))
17+
with self.assertRaises((ArgumentError, SystemExit)):
18+
self.assertIsNone(__main__.main(["thainlp"]))
1819

1920
with self.assertRaises((ArgumentError, SystemExit)):
2021
self.assertIsNone(
2122
__main__.main(["thainlp", "NOT_EXIST", "command"])
2223
)
2324

25+
self.assertIsNone(__main__.main(["thainlp", "data", "path"]))
26+
27+
2428
def test_cli_data(self):
2529
self.assertIsInstance(getattr(cli, "data"), ModuleType)
2630

0 commit comments

Comments
 (0)