laforge has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/pysim/+/41675?usp=email )


Change subject: unittest/test_files.TransparentEF_Test: Actually test encoder
......................................................................

unittest/test_files.TransparentEF_Test: Actually test encoder

In the test_encode_file() method, we should actually test the encoder,
and not the decoder.  I suppose this was a copy+paste mistake at some
point?  In the LinearFixedEF_Test.test_encoder_record we were already
testing the encoder. Just TransparentEF_Test got it wrong...

Change-Id: Id23305a78ab9acd2e006f2b26b72408795844d23
---
M tests/unittests/test_files.py
1 file changed, 2 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/75/41675/1

diff --git a/tests/unittests/test_files.py b/tests/unittests/test_files.py
index a3ccf06..ab70771 100755
--- a/tests/unittests/test_files.py
+++ b/tests/unittests/test_files.py
@@ -256,8 +256,8 @@
                         encoded = t[0]
                         decoded = t[1]
                         logging.debug("Testing encode of %s", name)
-                        re_dec = inst.decode_hex(encoded)
-                        self.assertEqual(decoded, re_dec)
+                        re_enc = inst.encode_hex(decoded)
+                        self.assertEqual(encoded, re_enc)

     def test_de_encode_file(self):
         """Test the decoder and encoder for a transparent EF.  Performs first 
a decoder

--
To view, visit https://gerrit.osmocom.org/c/pysim/+/41675?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings?usp=email

Gerrit-MessageType: newchange
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: Id23305a78ab9acd2e006f2b26b72408795844d23
Gerrit-Change-Number: 41675
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <[email protected]>

Reply via email to