Merge pull request #264772 from thiagokokada/fix-icontract

python3Packages.icontract: fix build
This commit is contained in:
Thiago Kenji Okada 2023-11-01 16:07:05 +00:00 committed by GitHub
commit 9387dfcba3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 19 additions and 4 deletions

View file

@ -77,13 +77,17 @@ buildPythonPackage rec {
"test_scheme_contract_is_satisfied_when_setting_arg"
"test_scheme_contract_is_satisfied_within_chain"
"test_scheme_errors_rewrite_message"
# broken since pytest > 7.1.3
"test_exception_hook"
# assert errors
"test_doctest"
"test_no_violations"
];
disabledTestPaths = [
# needs internet access
"tests/test_runtime/test_offline.py"
# depends on typeguard <4.0.0 for tests, but >=4.0.0 seems fine for runtime
# https://github.com/life4/deal/blob/9be70fa1c5a0635880619b2cea83a9f6631eb236/pyproject.toml#L40
"tests/test_testing.py"
];
pythonImportsCheck = [ "deal" ];

View file

@ -50,6 +50,13 @@ buildPythonPackage rec {
# mypy decorator checks don't pass. For some reason mypy
# doesn't check the python file provided in the test.
"tests/test_mypy_decorators.py"
# those tests seems to simply re-run some typeguard tests
"tests/test_typeguard.py"
];
pytestFlagsArray = [
# RuntimeWarning: coroutine '*' was never awaited
"-W" "ignore::RuntimeWarning"
];
pythonImportsCheck = [ "icontract" ];

View file

@ -54,8 +54,12 @@ buildPythonPackage rec {
];
disabledTests = [
# not compatible with python3.10
"test_typed_dict"
# AssertionError: 'type of argument "x" must be ' != 'None'
"TestPrecondition::test_precondition_ok_and_typeguard_fails"
# AttributeError: 'C' object has no attribute 'x'
"TestInvariant::test_invariant_ok_and_typeguard_fails"
# AttributeError: 'D' object has no attribute 'x'
"TestInheritance::test_invariant_ok_and_typeguard_fails"
];
meta = with lib; {