micropython-lib/python-stdlib/functools
W Winfried Kretzschmar 61efc92e26 functools: Add functools.total_ordering.
This commit is the result of copying the total_ordering code and tests
over from CPython v3.7.17.
One test is disabled because it expects builtin objects to have
attributes (__lt__, __gt__, etc.).
Another test for compatibility with pickle is also disabled because
pickle compatibility is currently broken.
Bumped package version to 0.0.8.

The functools code in CPython has the following credits:

Written by Nick Coghlan <ncoghlan at gmail.com>,
Raymond Hettinger <python at rcn.com>,
and Łukasz Langa <lukasz at langa.pl>.
  Copyright (C) 2006-2013 Python Software Foundation.
See C source code for _functools credits/copyright

This work was donated by W Winfried Kretzschmar.

Signed-off-by: W Winfried Kretzschmar <winni@warrenwk.com>
2024-03-19 15:35:50 +01:00
..
functools functools: Add functools.total_ordering. 2024-03-19 15:35:50 +01:00
Dockerfile functools: Add functools.total_ordering. 2024-03-19 15:35:50 +01:00
README.md functools: Add functools.total_ordering. 2024-03-19 15:35:50 +01:00
manifest.py functools: Add functools.total_ordering. 2024-03-19 15:35:50 +01:00
test_partial.py all: Run black over all code. 2021-05-27 15:50:04 +10:00
test_reduce.py all: Run black over all code. 2021-05-27 15:50:04 +10:00
test_total_ordering.py functools: Add functools.total_ordering. 2024-03-19 15:35:50 +01:00

README.md

functools

Testing

Install docker

See https://docs.docker.com/engine/install/

Build test environment

docker build -t micropython-unittest .

Run tests

All test files are designed to execute their own tests either as assert statements or as a call to unittest.

for i in test_*.py; do docker run -v .:/code -ti --rm micropython-unittest micropython $i; done

License

Some files are distributed under the Python Software Foundation license. These files reference the Python Software Foundation license at the top of the file.