<p>fixeria has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/pysim/+/23327">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">pySim/utils_test.py: rename, move, and execute this on Jenkins<br><br>As it turns out, we had this set of unit tests since 2018, but<br>so far they were not executed during the build verification.<br><br>Let's fix this:<br><br>  * rename this file, so it can be automatically detected and executed;<br>  * run unittest in discovery mode for all files in 'tests/';<br>  * properly import the API to be tested.<br><br>Currently 2 out of 16 unit tests are failing.<br><br>Change-Id: I4d4facfabc75187acd5238ff4d0f26022bd58f82<br>---<br>M contrib/jenkins.sh<br>R tests/test_utils.py<br>2 files changed, 4 insertions(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/27/23327/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh</span><br><span>index bfbf4e0..e286047 100755</span><br><span>--- a/contrib/jenkins.sh</span><br><span>+++ b/contrib/jenkins.sh</span><br><span>@@ -15,6 +15,9 @@</span><br><span> pip install pyyaml</span><br><span> pip install cmd2</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+# Execute automatically discovered unit tests first</span><br><span style="color: hsl(120, 100%, 40%);">+python -m unittest discover -v -s tests/</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> cd pysim-testdata</span><br><span> ../tests/pysim-test.sh</span><br><span> </span><br><span>diff --git a/pySim/utils_test.py b/tests/test_utils.py</span><br><span>similarity index 97%</span><br><span>rename from pySim/utils_test.py</span><br><span>rename to tests/test_utils.py</span><br><span>index 5cdb55e..44fe631 100644</span><br><span>--- a/pySim/utils_test.py</span><br><span>+++ b/tests/test_utils.py</span><br><span>@@ -1,7 +1,7 @@</span><br><span> #!/usr/bin/env python3</span><br><span> </span><br><span> import unittest</span><br><span style="color: hsl(0, 100%, 40%);">-import utils </span><br><span style="color: hsl(120, 100%, 40%);">+import pySim.utils as utils</span><br><span> </span><br><span> class DecTestCase(unittest.TestCase):</span><br><span> </span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/pysim/+/23327">change 23327</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/c/pysim/+/23327"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: pysim </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I4d4facfabc75187acd5238ff4d0f26022bd58f82 </div>
<div style="display:none"> Gerrit-Change-Number: 23327 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: fixeria <vyanitskiy@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>