[S] Change in ...pyosmocom[master]: test_construct: move testvectors inside unittest class
dexter has submitted this change. ( https://gerrit.osmocom.org/c/python/pyosmocom/+/38287?usp=email ) Change subject: test_construct: move testvectors inside unittest class ...................................................................... test_construct: move testvectors inside unittest class The unittest class TestGreedyInt has test vectors declared outside that class, but no other class makes use of this test vectors, so let's move them into TestGreedyInt, where they should be. Related: SYS#7094 Change-Id: Ida24295091efd30406e9a354ca5854150127b3d4 --- M tests/test_construct.py 1 file changed, 5 insertions(+), 5 deletions(-) Approvals: laforge: Looks good to me, approved fixeria: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/tests/test_construct.py b/tests/test_construct.py index 9110144..c2aeece 100755 --- a/tests/test_construct.py +++ b/tests/test_construct.py @@ -6,21 +6,21 @@ # pylint: disable=no-name-in-module from construct import FlagsEnum -tests = [ +class TestGreedyInt(unittest.TestCase): + tests = [ ( b'\x80', 0x80 ), ( b'\x80\x01', 0x8001 ), ( b'\x80\x00\x01', 0x800001 ), ( b'\x80\x23\x42\x01', 0x80234201 ), - ] + ] -class TestGreedyInt(unittest.TestCase): def test_GreedyInt_decoder(self): gi = GreedyInteger() - for t in tests: + for t in self.tests: self.assertEqual(gi.parse(t[0]), t[1]) def test_GreedyInt_encoder(self): gi = GreedyInteger() - for t in tests: + for t in self.tests: self.assertEqual(t[0], gi.build(t[1])) pass -- To view, visit https://gerrit.osmocom.org/c/python/pyosmocom/+/38287?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: python/pyosmocom Gerrit-Branch: master Gerrit-Change-Id: Ida24295091efd30406e9a354ca5854150127b3d4 Gerrit-Change-Number: 38287 Gerrit-PatchSet: 1 Gerrit-Owner: dexter <pmaier@sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier@sysmocom.de> Gerrit-Reviewer: fixeria <vyanitskiy@sysmocom.de> Gerrit-Reviewer: laforge <laforge@osmocom.org>
participants (1)
-
dexter