Attention is currently required from: laforge, dexter.
fixeria has posted comments on this change. (
https://gerrit.osmocom.org/c/pysim/+/24012
)
Change subject: filesystem: add unit tests for encoder/decoder methods
......................................................................
Patch Set 12: Code-Review+1
(3 comments)
Patchset:
PS12:
Looks good now!
File tests/test_files.py:
https://gerrit.osmocom.org/c/pysim/+/24012/comment/0038742d_bb179b05
PS12, Line 56: debug("Testing decode of %s" % name)
Not really critical (for tests), just a tip: documentation of the Python's logging
framework recommends using lazy format-string composition instead of manual composition
in-place. This can be achieved by passing format string arguments as arguments of the
logging functions:
logging.debug("Testing decode of %s", name)
The idea is that the format string is evaluated only if it's actually going to be
printed.
https://gerrit.osmocom.org/c/pysim/+/24012/comment/e42616b2_906e0d07
PS12, Line 160: for c in classes:
Can be done a bit simpler:
return filter(lambda c: c not in trans_rec_classes, classes)
Also, you can make it a class variable, so there would be no need to call get_classes()
every time.
--
To view, visit
https://gerrit.osmocom.org/c/pysim/+/24012
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I02d884547f4982e0b8ed7ef21b8cda75237942e2
Gerrit-Change-Number: 24012
Gerrit-PatchSet: 12
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-CC: Falkenber9 <robert.falkenberg(a)tu-dortmund.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 31 Jan 2023 20:44:15 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment