This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
laforge gerrit-no-reply at lists.osmocom.orglaforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/24349 )
Change subject: execute unit tests via nose from "setup.py test"
......................................................................
execute unit tests via nose from "setup.py test"
Change-Id: I8b2205b2c4e31f4ca64d0e48f8073799c61c29c7
---
M contrib/jenkins.sh
R pySim/tests/test_utils.py
M setup.py
3 files changed, 5 insertions(+), 7 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/49/24349/1
diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh
index 27f0245..11d5b1e 100755
--- a/contrib/jenkins.sh
+++ b/contrib/jenkins.sh
@@ -24,9 +24,10 @@
pip install construct
pip install bidict
pip install gsm0338
+pip install nose
# Execute automatically discovered unit tests first
-python -m unittest discover -v -s tests/
+python -m ./setup.py test
# Run pylint to find potential errors
# Ignore E1102: not-callable
diff --git a/tests/test_utils.py b/pySim/tests/test_utils.py
old mode 100755
new mode 100644
similarity index 98%
rename from tests/test_utils.py
rename to pySim/tests/test_utils.py
index 17a9300..899f391
--- a/tests/test_utils.py
+++ b/pySim/tests/test_utils.py
@@ -1,5 +1,3 @@
-#!/usr/bin/env python3
-
import unittest
from pySim import utils
from pySim.ts_31_102 import EF_SUCI_Calc_Info
@@ -179,6 +177,3 @@
res = utils.bertlv_parse_one(b'\x81\x01\x01');
self.assertEqual(res, ({'tag':1, 'constructed':False, 'class':2}, 1, b'\x01', b''))
-
-if __name__ == "__main__":
- unittest.main()
diff --git a/setup.py b/setup.py
index 2ef498f..37129b8 100644
--- a/setup.py
+++ b/setup.py
@@ -22,5 +22,7 @@
'pySim-prog.py',
'pySim-read.py',
'pySim-shell.py'
- ]
+ ],
+ test_suite='nose.collector',
+ tests_require=['nose'],
)
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/24349
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I8b2205b2c4e31f4ca64d0e48f8073799c61c29c7
Gerrit-Change-Number: 24349
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210523/14b07bec/attachment.htm>