diff options
author | Javier Sánchez Parra <jsanchez@soleta.eu> | 2019-07-05 12:40:06 +0200 |
---|---|---|
committer | OpenGnSys Support Team <soporte-og@soleta.eu> | 2019-07-05 17:41:26 +0200 |
commit | 880cc90c14f5d8ffa555d12f691785e79a3d6c54 (patch) | |
tree | 707ac6b2e6c724e37cc0a1b33499343db6d0609f /tests | |
parent | b4a9fddf3094e9b2aeaab8e769f091b992d18786 (diff) |
#915 Improve test output using unittest discover
* Call the tests with python module unittest. In particular, the
discover function.
* Rename tests files to meet the default requirements of discover
function.
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/run-tests.py | 3 | ||||
-rw-r--r-- | tests/units/test_0001_get_clients.py (renamed from tests/units/0001-get-clients.py) | 0 | ||||
-rw-r--r-- | tests/units/test_0002_post_clients.py (renamed from tests/units/0002-post-clients.py) | 0 | ||||
-rw-r--r-- | tests/units/test_0003_post_wol.py (renamed from tests/units/0003-post-wol.py) | 0 | ||||
-rw-r--r-- | tests/units/test_0004_post_shell_run.py (renamed from tests/units/0004-post-shell-run.py) | 0 | ||||
-rw-r--r-- | tests/units/test_0005_post_shell_output.py (renamed from tests/units/0005-post-shell-output.py) | 0 | ||||
-rw-r--r-- | tests/units/test_0006_post_session.py (renamed from tests/units/0006-post-session.py) | 0 |
7 files changed, 1 insertions, 2 deletions
diff --git a/tests/run-tests.py b/tests/run-tests.py index f0ddb87..126105d 100755 --- a/tests/run-tests.py +++ b/tests/run-tests.py @@ -30,8 +30,7 @@ start_mysql(); subprocess.Popen(['../ogAdmServer', '-f', 'config/ogAdmServer.cfg']) -for filename in glob.iglob('units/**'): - subprocess.run(['python3', filename, '-v']) +subprocess.run('python3 -m unittest discover -s units -v', shell=True) stop_mysql(); diff --git a/tests/units/0001-get-clients.py b/tests/units/test_0001_get_clients.py index 5571225..5571225 100644 --- a/tests/units/0001-get-clients.py +++ b/tests/units/test_0001_get_clients.py diff --git a/tests/units/0002-post-clients.py b/tests/units/test_0002_post_clients.py index b1e60c9..b1e60c9 100644 --- a/tests/units/0002-post-clients.py +++ b/tests/units/test_0002_post_clients.py diff --git a/tests/units/0003-post-wol.py b/tests/units/test_0003_post_wol.py index cbb2fd1..cbb2fd1 100644 --- a/tests/units/0003-post-wol.py +++ b/tests/units/test_0003_post_wol.py diff --git a/tests/units/0004-post-shell-run.py b/tests/units/test_0004_post_shell_run.py index 7be1fa9..7be1fa9 100644 --- a/tests/units/0004-post-shell-run.py +++ b/tests/units/test_0004_post_shell_run.py diff --git a/tests/units/0005-post-shell-output.py b/tests/units/test_0005_post_shell_output.py index 622e482..622e482 100644 --- a/tests/units/0005-post-shell-output.py +++ b/tests/units/test_0005_post_shell_output.py diff --git a/tests/units/0006-post-session.py b/tests/units/test_0006_post_session.py index d235179..d235179 100644 --- a/tests/units/0006-post-session.py +++ b/tests/units/test_0006_post_session.py |