We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 16e3584 commit aa9b7fdCopy full SHA for aa9b7fd
pytest_django/plugin.py
@@ -122,8 +122,14 @@ def _add_django_project_to_path(args):
122
def is_django_project(path):
123
return path.is_dir() and (path / 'manage.py').exists()
124
125
+ def arg_to_path(arg):
126
+ # Test classes or functions can be appended to paths separated by ::
127
+ arg = arg.split("::", 1)[0]
128
+ return pathlib.Path(arg)
129
+
130
def find_django_path(args):
- args = [pathlib.Path(x) for x in args if not str(x).startswith("-")]
131
+ args = map(str, args)
132
+ args = [arg_to_path(x) for x in args if not x.startswith("-")]
133
args = [p for p in args if p.is_dir()]
134
135
if not args:
0 commit comments