You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
When running Approval tests, there is NameError: name 'version_number' is not defined #103
When using Approval tests 3.1.1, I see error when running tests
"/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/site-packages/approvaltests/__init__.py", line 8, in <module>
__version__ = version_number
NameError: name 'version_number' is not defined
Error: Process completed with exit code 1.
Python 3.10.0 (v3.10.0:b494f5935c, Oct 4 2021, 14:59:19) [Clang 12.0.5 (clang-1205.0.22.11)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import approvaltests
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/user/workspace/tmp/.venv_test/lib/python3.10/site-packages/approvaltests/__init__.py", line 8, in <module>
__version__ = version_number
NameError: name 'version_number' is not defined
>>>
I only have approval test installed in Python virtual enviroment and my pip list looks like:
+1: for the pkgsrc package, I get the same NameError as @aaltat when trying to run the pytest example from the README. And patching approvaltests/version.py to say version_number instead of version makes things work.
+1: for the pkgsrc package, I get the same NameError as @aaltat when trying to run the pytest example from the README. And patching approvaltests/version.py to say version_number instead of version makes things work.
Best to ping Llewellyn directly, as AFAIK he doesn't see/receive GitHub notifications...
Activity
aaltat commentedon Nov 26, 2021
I can reproduce the problem with this
I only have approval test installed in Python virtual enviroment and my pip list looks like:
aaltat commentedon Nov 26, 2021
When I download version 3.1.1 ( https://pypi.org/project/approvaltests/3.1.1/#files ) from Pypi and look at the version.py I see
But init.py uses:
I think the bug is in GitHub action. I think
echo versionshould beecho version_number.aaltat commentedon Dec 6, 2021
Because of this bug, it breaks example the https://pypi.org/project/pytest-approvaltests/
schmonz commentedon Dec 15, 2021
+1: for the pkgsrc package, I get the same NameError as @aaltat when trying to run the pytest example from the README. And patching
approvaltests/version.pyto sayversion_numberinstead ofversionmakes things work.claremacrae commentedon Dec 15, 2021
Best to ping Llewellyn directly, as AFAIK he doesn't see/receive GitHub notifications...
There is a PR for this already, I see...
aaltat commentedon Dec 15, 2021
Would someone be able to ping him, I have no idea where to reach him?
claremacrae commentedon Dec 15, 2021
I've just pinged Llewellyn :-)
A small group works on it most Sundays, so it may get picked up then...
schmonz commentedon Dec 22, 2021
3.3.2 solves this for me. If @aaltat agrees, this can be closed.
isidore commentedon Feb 6, 2022
Thanks, fixed in 3.3.2
Sorry for the bug