Closed tirkarthi closed 1 year ago
I also get these errors:
FAILED tests/test_script.py::Test2Args::test_add_parens - AssertionError: assert 'assert (not a) == c\n' == 'assert not a == c\n'
FAILED tests/test_script.py::Test3Args::test_add_parens - AssertionError: assert 'assert abs((... d)) <= 0.1\n' == 'assert abs(a... d)) <= 0.1\n'
for python 3.7 and 3.8
Regarding those errors mentioned by @PhilippSelenium , there is a bit of semi-related discussion at https://github.com/pytest-dev/nose2pytest/commit/850e40fce8de76c82269dca74746e6a9cb054769#r44152239
Note in both cases it is the presentation of the assertion error which is different. That has no effect on whether nose2pytest is working correctly, and is very likely dependent on the pytest version being used in testing. Building the tests to support lots of pytest versions would be quite useful, and that would be a good reason to use tox
in travis (actually tox-travis)
Running pytest with --assert=plain might help getting the tests working with more pytest versions
I get the same errors when running with --assert=plain
Note that this also applies to Python 3.10 (https://github.com/pytest-dev/nose2pytest/pull/21).
We are looking for volunteers to look into this issue.
I have fixed this: now works up to Python 3.11.
This was not pushed to pypi, @nicoddemus @schollii
I'm afraid I don't have release right on PyPI.
@schollii could you please add me as maintainer on PyPI? Then we can setup a deploy workflow to streamline releases.
@nicoddemus done but please let me know before pushing updates to pypi
No problem.
I plan to add a deploy
workflow like this one, and use the same release process, so every release should be made from a PR and have at least another approval. Is that sufficient you think?
Yes that works
I tried to use this project today and it failed with an error:
@ nose2pytest --help
Traceback (most recent call last):
File "/Users/jaraco/.local/bin/nose2pytest", line 5, in <module>
from nose2pytest.script import main
File "/Users/jaraco/.local/pipx/venvs/nose2pytest/lib/python3.11/site-packages/nose2pytest/script.py", line 115, in <module>
raise RuntimeError('nose2pytest must be run using Python in [3.4, 3.5, 3.6]')
RuntimeError: nose2pytest must be run using Python in [3.4, 3.5, 3.6]
Are there any plans to release a version that runs on a supported Python version?
@jaraco which nose2pytest release/commit did you try? Latest (as of Nov 2022) works up to python 3.11.
1.0.8:
excuses main @ pipx install --force nose2pytest
installed package nose2pytest 1.0.8, installed using Python 3.11.5
These apps are now globally available
- nose2pytest
done! ✨ 🌟 ✨
excuses main @ nose2pytest --help
Traceback (most recent call last):
File "/Users/jaraco/.local/bin/nose2pytest", line 5, in <module>
from nose2pytest.script import main
File "/Users/jaraco/.local/pipx/venvs/nose2pytest/lib/python3.11/site-packages/nose2pytest/script.py", line 115, in <module>
raise RuntimeError('nose2pytest must be run using Python in [3.4, 3.5, 3.6]')
RuntimeError: nose2pytest must be run using Python in [3.4, 3.5, 3.6]
That's the latest version on PyPI:
I was able to work around the issue by installing from Github instead of PyPI, but in my experience, PyPI is the canonical place to publish releases. It's also where the readme directs the user for installation.
@jaraco thanks and I agree we need to fix this.
@nicoddemus any update on creating that workflow? Looks like there should have been a 1.0.9 release or such.
% pipx install git+https://github.com/pytest-dev/nose2pytest.git
The plugin seems to have a manual check for Python versions that it supports. 3.9 is to be released soon. Nose has problems related to importing ABC from collections directly https://github.com/nose-devs/nose/issues/1099 . This change was postponed to 3.10 but might cause more people to migrate to pytest.
Also note that lib2to3 is deprecated since Python 3.10.
Enabling 3.9 in the conditional gives me below errors :