Chris
commited on
Commit
·
6ee7dff
1
Parent(s):
5cbd28e
added some basic CLI testing, missing tests for language list and additional translation tests which can be added at will using existing tests as a template.
Browse files
deep_translator/tests/test_cli.py
CHANGED
@@ -9,4 +9,8 @@ def results_test():
|
|
9 |
runner = CliRunner()
|
10 |
result = runner.invoke(cli.main, [ 'google', 'auto', 'en', '좋은'])
|
11 |
assert result.exit_code == 0
|
12 |
-
assert result == 'good'
|
|
|
|
|
|
|
|
|
|
9 |
runner = CliRunner()
|
10 |
result = runner.invoke(cli.main, [ 'google', 'auto', 'en', '좋은'])
|
11 |
assert result.exit_code == 0
|
12 |
+
assert result == 'good'
|
13 |
+
|
14 |
+
api_error = runner.invoke(cli.main, ['microsoft','auto','en','Zwei minimale Dellchen auf der Rückseite.'])
|
15 |
+
assert api_error.exit_code == 0
|
16 |
+
assert api_error == "This translator requires an api key provided through --api-key"
|