Commit graph

8 commits

Author SHA1 Message Date
Maarten ter Huurne
9d3940a6f2 Annotate the test_choices module
This required a bit of refactoring to get the type of `STATUS` correct
for each suite.

There are two cases which I decided not to support in the type system:
- passing a list instead of a tuple when defining an option group
- `in` checks using a data type that doesn't match the choices
2024-06-13 12:02:05 +02:00
Maarten ter Huurne
23f1811b9d Annotate return type of test methods 2024-06-13 12:02:05 +02:00
Maarten ter Huurne
aeeb69a9dd Enable postponed evaluation of annotations for all test modules
This allows using the latest annotation syntax supported by the type
checker regardless of the runtime Python version.
2024-06-13 12:02:05 +02:00
Adam Dobrawy
ffa1a85dc7 Modernize Python syntax, add Python 3.8 (#398)
* Modernize Python syntax, add Python 3.8

* Update Python version & dist in TravisCI

* Add postgresql as addon

* Switch to psycopg2-binary

* Drop django.utils.six
2019-11-14 22:50:04 +06:00
asday
383740e8ab Added Choices().subset(). 2019-08-19 22:33:08 +01:00
Éric Araujo
764b7ea78d Add support for reverse iteration of Choices (#314) 2018-12-08 11:47:54 +06:00
Lucas Wiman
9189d60996 Fix remaining non-E501 line length changes.
The E402 module level import appears to be an error of some kind in flake8?
2018-07-02 13:01:49 -07:00
Bruno Alla
10ebc16271 Exclude tests from distribution
fixes #258
2017-02-15 23:00:10 +00:00
Renamed from model_utils/tests/test_choices.py (Browse further)