Projects
osmocom:latest
pyosmocom
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 3
View file
pyosmocom_0.0.6.dsc -> pyosmocom_0.0.7.dsc
Changed
@@ -2,7 +2,7 @@ Source: pyosmocom Binary: python3-pyosmocom-doc, python3-pyosmocom Architecture: all -Version: 0.0.6 +Version: 0.0.7 Maintainer: Osmocom team <openbsc@lists.osmocom.org> Homepage: https://osmocom.org/projects/pyosmocom/wiki Standards-Version: 3.9.8 @@ -13,8 +13,8 @@ python3-pyosmocom deb python optional arch=all python3-pyosmocom-doc deb doc optional arch=all Checksums-Sha1: - e63497bda094dd5fb37732b85e94ec1b1a4c2f0f 32780 pyosmocom_0.0.6.tar.xz + a6907bc3986b968ac0625cf7dfc7bb1aa8276d2c 32964 pyosmocom_0.0.7.tar.xz Checksums-Sha256: - 02e8024366c6e64c342aee7dfdb0b0ba5315a4deadd8f7a034ae3d5860a76dee 32780 pyosmocom_0.0.6.tar.xz + dd8c1dd6834c75695cfd1c9c6945fdd65f9e5e138a583a636b7b0293bab9a3fc 32964 pyosmocom_0.0.7.tar.xz Files: - 31fecb54515408b0e9337628a89454e0 32780 pyosmocom_0.0.6.tar.xz + 86efcc7d8fe79cd457b51b99fe5a22fd 32964 pyosmocom_0.0.7.tar.xz
View file
pyosmocom_0.0.6.tar.xz/.tarball-version -> pyosmocom_0.0.7.tar.xz/.tarball-version
Changed
@@ -1 +1 @@ -0.0.6 +0.0.7
View file
pyosmocom_0.0.6.tar.xz/debian/changelog -> pyosmocom_0.0.7.tar.xz/debian/changelog
Changed
@@ -1,3 +1,10 @@ +pyosmocom (0.0.7) unstable; urgency=medium + + Jean-Pierre Marcotte + * Fixing 3-digit MNC PlmnAdapter encoding & decoding, and related tests. + + -- Philipp Maier <pmaier@sysmocom.de> Tue, 26 Nov 2024 14:29:03 +0100 + pyosmocom (0.0.6) unstable; urgency=medium * tlv/cosmetic: improve import of osmocom functions
View file
pyosmocom_0.0.6.tar.xz/pyproject.toml -> pyosmocom_0.0.7.tar.xz/pyproject.toml
Changed
@@ -4,7 +4,7 @@ project name = "pyosmocom" -version = "0.0.6" +version = "0.0.7" dependencies = "gsm0338", "construct >= 2.9.51"
View file
pyosmocom_0.0.6.tar.xz/src/osmocom/construct.py -> pyosmocom_0.0.7.tar.xz/src/osmocom/construct.py
Changed
@@ -262,20 +262,20 @@ return super()._encode(obj, context, path) class PlmnAdapter(BcdAdapter): - """convert a bytes(3) type to BCD string like 262-02 or 262-002.""" + """convert a bytes(3) type to BCD string like 262-02 or 262-002 as specified in 3GPP TS 24.008 ยง 10.5.1.3.""" def _decode(self, obj, context, path): bcd = super()._decode(obj, context, path) if bcd3 == 'f': return '-'.join(bcd:3, bcd4:) else: - return '-'.join(bcd:3, bcd3:) + return '-'.join(bcd:3, bcd4:6+bcd3) def _encode(self, obj, context, path): l = obj.split('-') if len(l1) == 2: bcd = l0 + 'f' + l1 else: - bcd = l0 + l1 + bcd = l0 + l12 + l10:2 return super()._encode(bcd, context, path) class InvertAdapter(Adapter):
View file
pyosmocom_0.0.6.tar.xz/tests/test_construct.py -> pyosmocom_0.0.7.tar.xz/tests/test_construct.py
Changed
@@ -113,6 +113,22 @@ re_enc = ad._encode(exp_dec, None, None) self.assertEqual(re_enc, enc) + def test_plmn_adapter(self): + ad = PlmnAdapter(Bytes(3)) + td = + (bytes.fromhex('62f210'),'262-01'), + (bytes.fromhex('21f354'),"123-45"), + (bytes.fromhex('216354'),"123-456"), + (bytes.fromhex('030251'),"302-150") + + for enc, exp_dec in td: + with self.subTest(type='decode', name=exp_dec): + dec = ad._decode(enc, None, None) + self.assertEqual(dec, exp_dec) + with self.subTest(type='encode', name=exp_dec): + re_enc = ad._encode(exp_dec, None, None) + self.assertEqual(re_enc, enc) + class TestAsn1DerInteger(unittest.TestCase):
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.