mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-07-27 16:40:03 +03:00
Fix ./runtests.py failing without any args
Previously, running this script without args would result in an error: $ ./runtests.py Traceback (most recent call last): File "./runtests.py", line 49, in <module> sys.exit(pytest.main(pytest_args)) NameError: name 'pytest_args' is not defined
This commit is contained in:
parent
3875d3284e
commit
0bf2404476
|
@ -45,5 +45,7 @@ if __name__ == "__main__":
|
||||||
# `runtests.py TestCase [flags]`
|
# `runtests.py TestCase [flags]`
|
||||||
# `runtests.py test_function [flags]`
|
# `runtests.py test_function [flags]`
|
||||||
pytest_args = ['tests', '-k', pytest_args[0]] + pytest_args[1:]
|
pytest_args = ['tests', '-k', pytest_args[0]] + pytest_args[1:]
|
||||||
|
else:
|
||||||
|
pytest_args = []
|
||||||
|
|
||||||
sys.exit(pytest.main(pytest_args))
|
sys.exit(pytest.main(pytest_args))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user