-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Collection error when HTTPError passed to parametrize #10184
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
Comments
I believe pytest. param(...,id=...)can be used to mitigate the bug in the stdlib by setting explicit ids |
jaraco
added a commit
to pypa/distutils
that referenced
this issue
Aug 4, 2022
Very nice. Yes, that's a suitable workaround. Much better than the string eval workaround I was using. |
I'll close this issue, but I welcome maintainers to re-open if they deem appropriate. |
2 tasks
clrpackages
pushed a commit
to clearlinux-pkgs/pypi-setuptools
that referenced
this issue
Aug 12, 2022
…version 63.4.3 Anderson Bravalheri (1): Update docs/userguide/dependency_management.rst Jason R. Coombs (86): Convert test_cmd to pytest Convert BasePyPIRCCommandTestCase to pytest Convert RegisterTestCase to pytest ⚫ Fade to black. Use jaraco.path to generate a tree. Port sdist tests to pytest Convert TestUpload to pytest Convert TestUpload to parametrized test. Remove dependence on unittest for PyPIRC tests. Implement HTTP 400 error as a pytest.param to avoid collection error. Ref pytest-dev/pytest#10184. Convert core tests to pytest ⚫ Fade to black. Convert TestVersion to pytest. Convert TestConfig to pytest Convert TestCygwinCCompiler to pytest Convert TestDirUtil to pytest Convert TestFileUtil to pytest Convert TestSysconfig to pytest ⚫ Fade to black. 👹 Feed the hobgoblins (delint). Remove patching of uname. Convert TestUtil to pytest Convert TestUnixCCompiler to pytest Prefer pytest for skip Convert more tests to pytest Prefer pytest for skip Prefer pytest for skip Convert TestBuild to pytest Prefer pytest for skip Prefer pytest for skip Remove unreachable code Copy xxmodule.c from Python 3.11 and 3.8, restoring tests for build_ext. Exclude Python 3.11 on macOS due to lack of wheels. Ref pypa/distutils#165. Mark test as xfail for now. Ref pypa/distutils#166. Use pathlib to read the text ⚫ Fade to black. Convert TestInstall to pytest Only xfail on Windows Allow overriding toxworkdir with an env var. Ensure sys.version is restored in test_cygwinccompiler. Fixes #166. Run test_xx in process, utilizing import_helper Redirect extension module to a directory that's not deleted on Windows. Include cygwin Prefer pytest in test_build_py Prefer pytest in test_check Refactor imports around docutils. Replace addCleanup with monkeypatch. Enable tests requiring docutils. Fix broken tests around docutils. Convert PendingDeprecationWarnings to DeprecationWarnings. Ignore unactionable warnings in docutils. Prefer pytest for skip Prefer pytest for skip Prefer pytest for skip Prefer pytest for skip Prefer pytest for skip Convert TestLog to pytest. Prefer pytest for skip Consolidate tests Prefer pytest for skip Prefer pytest for skip Convert unconditional skip to conditional skip. Mark test as xfail because it's failing. Prefer pytest for skip ⚫ Fade to black. Convert unix_compat to pytest skips Consistently import unittest.mock. Prefer pytest for skip Remove unnecessary comment. ⚫ Fade to black. 👹 Feed the hobgoblins (delint). Prefer tabs Add pytest-flake8 and pytest-black and pytest-cov to test lint and style and coverage 👹 Feed the hobgoblins (delint). Add test capturing failed expectation. Add compatibility for Python 3.7 Windows is sensitive even on Python 3.10 Also test library dirs Extract fixture for c_file Generate a C file that imports Python.h and something platform specific. Ensure Python include directory is configured. Extend the test to compile a second time after setting include dirs again. ⚫ Fade to black. Allow compiler classes to supply include and library dirs at the class level. Disallow repeat calls to .initialize in one place. Update changelog Revert "Disallow repeat calls to .initialize in one place." Bump version: 63.4.2 → 63.4.3 Steve Dower (4): Ensure Windows SDK directories are not cleared when caller specifies include/library dirs Remove stray colon Fixup bad super() call Use CCompiler._fix_compile_args to fix args to compile() nxnjz (1): typo fix smheidrich (1): Add docs section on direct URL dependencies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Using the latest version of pytest against this minimal reproducer produces an error in collection:
The same error can be elicited by trying to get the
__name__
property of anHTTPError
:I'm not sure if there's anything that can be done about this situation. In the code where I encountered it, I've decided to pass the parameter as a string and then eval it inside the test, a workaround to be sure.
The text was updated successfully, but these errors were encountered: