aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <vyanitskiy@sysmocom.de>2021-03-11 23:17:27 +0100
committerVadim Yanitskiy <vyanitskiy@sysmocom.de>2021-03-11 23:54:15 +0100
commit4ae7c4907604426dff60b819ec1bedd7dd70569e (patch)
tree104928805accdbe8fba4ca025b008dc7a4dfc095
parent7d57edfe2df814cb37a9b1c9b281b5560e7aee3a (diff)
pySim/utils_test.py: prepare this to be executed on Jenkins
As it turns out, we had this set of unit tests since 2018, but so far they were not executed during the build verification. Let's fix this: * run unittest in discovery mode for all files in 'tests/' (commented out); * rename this file, so it can be automatically detected and executed; * properly import the API to be tested. Currently 2 out of 16 unit tests are failing, so we need to get them passing first and then uncomment the unittest execution. Change-Id: I4d4facfabc75187acd5238ff4d0f26022bd58f82
-rwxr-xr-xcontrib/jenkins.sh4
-rw-r--r--tests/test_utils.py (renamed from pySim/utils_test.py)2
2 files changed, 5 insertions, 1 deletions
diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh
index bfbf4e0..9b4689d 100755
--- a/contrib/jenkins.sh
+++ b/contrib/jenkins.sh
@@ -15,6 +15,10 @@ pip install pytlv
pip install pyyaml
pip install cmd2
+# Execute automatically discovered unit tests first
+# TODO: uncomment once all tests are passing
+# python -m unittest discover -v -s tests/
+
cd pysim-testdata
../tests/pysim-test.sh
diff --git a/pySim/utils_test.py b/tests/test_utils.py
index 5cdb55e..44fe631 100644
--- a/pySim/utils_test.py
+++ b/tests/test_utils.py
@@ -1,7 +1,7 @@
#!/usr/bin/env python3
import unittest
-import utils
+import pySim.utils as utils
class DecTestCase(unittest.TestCase):