summaryrefslogtreecommitdiff
path: root/tests/basics/namedtuple1.py
AgeCommit message (Collapse)Author
2025-04-21py/objstr: Fix handling of OP_MODULO with namedtuple.Yoctopuce dev
This fix handles attrtuple as well, eg. os.uname(). A test case has been added in basics/attrtuple2.py. Fixes issue #16969. Signed-off-by: Yoctopuce dev <dev@yoctopuce.com>
2023-06-08tests: Replace umodule with module everywhere.Jim Mussared
This work was funded through GitHub Sponsors. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-07-13py/objnamedtuple: Fix segfault with empty namedtuple.Lars Haulin
The empty tuple is usually a constant object, but named tuples must be allocated to allow modification. Added explicit allocation to fix this. Also added a regression test to verify creating an empty named tuple works. Fixes issue #7870. Signed-off-by: Lars Haulin <lars.haulin@gmail.com>
2020-02-11tests/basics: Add test for equality between tuple and namedtuple.Damien George
2018-06-27tests/basics/namedtuple*: Import ucollections first.Paul Sokolovsky
Otherwise, test may have artefacts in the presence of the micropython-lib module.
2017-06-29tests/basics/namedtuple1: Add test for creating with pos and kw args.Damien George
2017-06-10tests/basics: Convert "sys.exit()" to "raise SystemExit".Paul Sokolovsky
2017-05-29various: Spelling fixesVille Skyttä
2017-02-15tests/basic/: Make various tests skippable.Paul Sokolovsky
To run the testsuite on small ports.
2016-05-23py/objnamedtuple: Allow passing field names as a tuple.Antonin ENFRUN
So the documentation's example works. Besides, a tuple can be more memory efficient.
2016-05-02tests: Update for _io/_collections module having been renamed.Paul Sokolovsky
2015-04-05tests: Add some more tests to improve code coverage of corner cases.Damien George
2015-01-01py: Allow keyword arguments for namedtuplestijn
2015-01-01py: Use sequence of strings for named tuple initializationstijn
- remove single string initialization style - take list of strings instead - store list in the type for fast lookup
2014-05-10objnamedtuple: Support iteration.Paul Sokolovsky
2014-04-13py: Rename collections module to _collections.Paul Sokolovsky
We're not going to implement all the plethora of types in there in C. Funnily, CPython implements defaultdict in C, and namedtuple in Python.
2014-03-03namedtuple: Inherit unary/binary ops from tuple base class.Paul Sokolovsky
2014-03-03Add basic collections.namedtuple implementation.Paul Sokolovsky