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
python-common: Add mypy testing #31071
python-common: Add mypy testing #31071
Conversation
+1 for mypy usage |
e643e11
to
0243f90
Compare
This has an impact on make check, but its not related to QA. |
jenkins test make check arm64 |
pytest | ||
commands=py.test -v {posargs:ceph/tests} | ||
deps=-rrequirements.txt | ||
commands=python setup.py test --addopts="--mypy --mypy-ignore-missing-imports" {posargs} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this imply python2?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a special overrride for [testenv:py27]
below. I.e. there is no way to run this test for Python 2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i still don't get it. i think it's
[testenv:py27]
commands=python setup.py test {posargs}
which overrides the global setting.
so "py3" will be using
python setup.py test --addopts="--mypy --mypy-ignore-missing-imports" {posargs}
for testing. as "lint" has its own "commands" already.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So you would prefer to have a [testenv:py3]
here? I can do that!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
0243f90
to
9ba33ac
Compare
if sys.version_info >= (3,0): | ||
mypy = ['mypy', 'pytest-mypy'] | ||
pytest = 'pytest >=2.1.3' | ||
else: | ||
mypy = [] | ||
pytest = 'pytest >=2.1.3,<5' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just for a record.
https://docs.pytest.org/en/latest/py27-py34-deprecation.html
Probably caused https://tracker.ceph.com/issues/42528 |
Signed-off-by: Sebastian Wagner sebastian.wagner@suse.com
cc @jschmid1
Checklist
Show available Jenkins commands
jenkins retest this please
jenkins test crimson perf
jenkins test signed
jenkins test make check
jenkins test make check arm64
jenkins test submodules
jenkins test dashboard
jenkins test dashboard backend
jenkins test docs
jenkins render docs