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

unknown pytest option --doctest-docutils-modules #496

Open
dvzrv opened this issue Aug 20, 2023 · 7 comments
Open

unknown pytest option --doctest-docutils-modules #496

dvzrv opened this issue Aug 20, 2023 · 7 comments

Comments

@dvzrv
Copy link

dvzrv commented Aug 20, 2023

Hi! I'm currently updating to 0.23.0post0 on Arch Linux and ran into the issue, that the setup.cfg declares an option to pytest that is not understood.

This is probably due to some pytest plugin or similar not being around or some version mismatch on your target test infrastructure.

ERROR: usage: pytest [options] [file_or_dir] [file_or_dir] [...]
pytest: error: unrecognized arguments: --doctest-docutils-modules
  inifile: /build/python-libtmux/src/libtmux-0.23.0post0/setup.cfg
  rootdir: /build/python-libtmux/src/libtmux-0.23.0post0

This is (roughly) how the package is being built: https://gitlab.archlinux.org/archlinux/packaging/packages/python-libtmux/-/blob/main/PKGBUILD
Here are the full build/test logs:
python-libtmux-0.23.0post0-1-x86_64-check.log
python-libtmux-0.23.0post0-1-x86_64-build.log

After using sed to replace --doctest-docutils-modules with --doctest-modules the tests work.

@tony
Copy link
Member

tony commented Aug 20, 2023

@dvzrv Does 0.23.0 (without the post0) give this issue, too?

Are you able to tell if gp-libs is installed along py.test?

gp-libs (homepage, github) is a test dependency and where the --doctest-docutils-modules comes from

@dvzrv
Copy link
Author

dvzrv commented Aug 21, 2023

@dvzrv Does 0.23.0 (without the post0) give this issue, too?

I haven't checked.

Are you able to tell if gp-libs is installed along py.test?

No I'm not installing/packaging that. It is not in the test environment.

gp-libs (homepage, github) is a test dependency and where the --doctest-docutils-modules comes from

I have been orienting according to this block to figure out what are the relevant test requirements for me.

Hm, guess I need to package yet another package 🥲

@tony
Copy link
Member

tony commented Aug 21, 2023

Hm, guess I need to package yet another package 🥲

Yes I think so - as a test dependency. gp-libs is also used by tmuxp, vcspull, and python-libvcs.

gp-libs' --doctest-docutils-modules lets tests be ran on markdown code, so, assume these lines on README.md, code examples like that get ran on py.test.

@johanneskastl
Copy link

Shouldn't this be in the test dependencies section in the pyproject.toml? And not (only) in the docs section?

@tony
Copy link
Member

tony commented Nov 21, 2023 via email

@tony
Copy link
Member

tony commented Nov 23, 2023

@johanneskastl @dvzrv If you try v0.24.1 (PyPI, github release, changelog), is anything different?

@johanneskastl
Copy link

@johanneskastl @dvzrv If you try v0.24.1 (PyPI, github release, changelog), is anything different?

See #508 for my findings. The unknown pytest option error was worked around by adding it to the dependencies in the openSUSE packaging already, so it's up to @dvzrv to test and report back :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants