Attention is currently required from: dexter.
laforge has posted comments on this change by dexter. ( https://gerrit.osmocom.org/c/pysim/+/38195?usp=email )
Change subject: filesystem: pass total_len to construct of when encoding file contents ......................................................................
Patch Set 2:
(2 comments)
File pySim/filesystem.py:
https://gerrit.osmocom.org/c/pysim/+/38195/comment/11de1800_b42b75ff?usp=ema... : PS1, Line 1043: __get_rec_len
I thought I could re-use _get_size() in TransRecEf, that is why _get_size only has one underscore.
I'm not following your argument here. In general, I think double-underscores in python are (should be?) reserved for python internal stuff like __str__ __init__, etc.
As we do not have a _get_rec_len with one underscore, why should we add one with two?
https://gerrit.osmocom.org/c/pysim/+/38195/comment/4de91a69_da1076d8?usp=ema... : PS1, Line 1266: return b2h(filter_dict(build_construct(self._construct, abstract_data, self._get_size(total_len))))
I see, we can not use _get_size here. […]
TransRecEF registeres the cdm2 command-set form TransparentEF, yes. It will call lchan.update_binary_dec() which in turn will call TransparentEF.encode_hex() which will call self._encode_bin() which is TransRecEF._encode_bin() which iterates over self.encode_record_bin() for all the given records in the input data.
So I don't understand the question about "how to test". Any update on a TransRecEF should exercise the above-mentioned methods, as long as the speicifc TransRecEF derived class only provides a _construct and does not override the _encode_{hex,bin} inherited from TransRecordEF.