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.

runtests.py attempts to collect tests from subrepos if extra arguments are given

See original GitHub issue

Problem 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?

  1. 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:closed
  • Created 3 years ago
  • Comments:14 (14 by maintainers)

github_iconTop GitHub Comments

2reactions
CAM-Gerlachcommented, May 9, 2020

Thanks so much for all your help @mrclary !

1reaction
ccordoba12commented, May 9, 2020

Great! Thanks a lot for your help Ryan!

Read more comments on GitHub >

github_iconTop 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 >

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