Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mypy completely ignores some test files #1346

Closed
karlb opened this issue Dec 6, 2019 · 1 comment
Closed

Mypy completely ignores some test files #1346

karlb opened this issue Dec 6, 2019 · 1 comment

Comments

@karlb
Copy link
Contributor

karlb commented Dec 6, 2019

This is because it only recurses into directories with an __init__.py, which is not true for all test directories. See python/mypy#6385 (comment)

Example

(venv-contracts) karl@t480karl:~/raiden-contracts (master)$ mypy raiden_contracts/tests/  # no errors found
(venv-contracts) karl@t480karl:~/raiden-contracts (master)$ mypy raiden_contracts/tests/property/
raiden_contracts/tests/property/strategies.py:16: error: Function is missing a type annotation
raiden_contracts/tests/property/strategies.py:40: error: Function is missing a type annotation
raiden_contracts/tests/property/strategies.py:55: error: Function is missing a return type annotation
raiden_contracts/tests/property/strategies.py:69: error: Function is missing a return type annotation
raiden_contracts/tests/property/strategies.py:77: error: Function is missing a type annotation
raiden_contracts/tests/property/test_tokennetwork.py:42: error: Function is missing a type annotation
raiden_contracts/tests/property/test_tokennetwork.py:60: error: Function is missing a return type annotation
raiden_contracts/tests/property/test_tokennetwork.py:60: note: Use "-> None" if function does not return a value
raiden_contracts/tests/property/test_tokennetwork.py:63: error: Need type annotation for 'log' (hint: "log: List[<type>] = ...")                                                                                                                             
raiden_contracts/tests/property/test_tokennetwork.py:74: error: Too few arguments for "deploy_custom_token"
raiden_contracts/tests/property/test_tokennetwork.py:75: error: Too few arguments for "deploy_custom_token"
raiden_contracts/tests/property/test_tokennetwork.py:88: error: Need type annotation for 'addresses' (hint: "addresses: List[<type>] = ...")                                                                                                                 
raiden_contracts/tests/property/test_tokennetwork.py:109: error: Argument 2 to "deploy_contract" has incompatible type "str"; expected "ContractManager"                                                                                                     
raiden_contracts/tests/property/test_tokennetwork.py:113: error: Argument 2 to "deploy_contract" has incompatible type "str"; expected "ContractManager"                                                                                                     
raiden_contracts/tests/property/test_tokennetwork.py:129: error: Too few arguments for "get_token_network"
raiden_contracts/tests/property/test_tokennetwork.py:142: error: Function is missing a return type annotation
raiden_contracts/tests/property/test_tokennetwork.py:177: error: Function is missing a type annotation
raiden_contracts/tests/property/test_tokennetwork.py:201: error: Function is missing a type annotation
raiden_contracts/tests/property/test_tokennetwork.py:204: error: Function is missing a type annotation
raiden_contracts/tests/property/test_tokennetwork.py:253: error: Function is missing a type annotation
raiden_contracts/tests/property/test_tokennetwork.py:344: error: Function is missing a type annotation
raiden_contracts/tests/property/test_tokennetwork.py:482: error: Function is missing a return type annotation

@karlb karlb changed the title Mypy ignores some tests files completely Mypy completely ignores some test files Dec 6, 2019
@palango
Copy link
Contributor

palango commented Aug 23, 2021

the raiden_contracts/tests/property/ directory is gone.

@palango palango closed this as completed Aug 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants