question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

pytest hook reference - pytest_cmdline_preparse deprecated

See original GitHub issue

pytest documentation mentions that pytest_cmdline_preparse hook will be deprecated.

Reference:

https://docs.pytest.org/en/latest/writing_plugins.html#_pytest.hookspec.pytest_cmdline_preparse

Question

What is the alternative to this hook moving forward?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
nicoddemuscommented, Dec 12, 2017

I don’t know so I dug around a little, it seems that deprecation was introduced in db6f347db6d3f2db5aa2cf2d27630db5ab99d589 with the introduction of pytest_load_initial_conftests, so I would recommend using that instead.

0reactions
Apterykscommented, Sep 30, 2021

Unfortunately pytest_load_initial_conftests doesn’t work from inside conftest.py, so it’s not an exact replacement.

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found