runtests.py attempts to collect tests from subrepos if extra arguments are given
See original GitHub issueProblem Description
Running pytests with extra arguments results in collection error.
Recommend updating runtests.py to add 'spyder'
in front of extra_args
What steps reproduce the problem?
- run
python runtests.py -k 'some_single_test'
What is the expected output? What do you see instead?
Should run single test, but instead attempts to load tests from subrepos in ‘external-deps’.
Paste Traceback/Error Below (if applicable)
_________________________________________________ ERROR collecting test session __________________________________________________
Defining 'pytest_plugins' in a non-top-level conftest is no longer supported because it affects the entire directory tree in a non-explicit way.
/Users/rclary/Documents/Python.git/developer/spyder/external-deps/python-language-server/test/conftest.py
Please move it to a top level conftest file at the rootdir:
/Users/rclary/Documents/Python.git/developer/spyder
For more information, visit:
https://docs.pytest.org/en/latest/deprecations.html#pytest-plugins-in-non-top-level-conftest-files
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
==================================================== 1 error in 0.38 seconds =====================================================
Issue Analytics
- State:
- Created 3 years ago
- Comments:14 (14 by maintainers)
Top Results From Across the Web
How to pass arguments in pytest by command line
In your pytest test, don't use @pytest.mark.parametrize : def test_print_name(name): print ("Displaying name: %s" % name). In conftest.py :
Read more >Parametrizing tests — pytest documentation
Generating parameters combinations, depending on command line¶. Let's say we want to execute a test with different computation parameters and the parameter ......
Read more >Parsing arguments and building values — Python 3.11.1 ...
Additional arguments passed to these functions must be addresses of variables whose type is determined by the format string; these are used to...
Read more >pytest and custom command line arguments
Here's a command line example that uses Maven to run tests and passes ... This can be done by adding the following snippet...
Read more >*args and **kwargs in Python - GeeksforGeeks
Python program to illustrate **kwargs for a variable number of keyword arguments with one extra argument. All the same, but one change is...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks so much for all your help @mrclary !
Great! Thanks a lot for your help Ryan!