CleanCut / green

Green is a clean, colorful, fast python test runner.
MIT License
786 stars 74 forks source link

-p won't do anything #166

Closed 4poc closed 6 years ago

4poc commented 7 years ago

Maybe I misunderstood the docs but:

  -p PATTERN, --file-pattern PATTERN
                        Pattern to match test files. Default is test*.py

This does not seem to do anything:

green -p test_dialog.py

this runs all tests as usual, but I want to constrain it to a particular file by name, should this not work?

CleanCut commented 7 years ago

It works as described for me on my Mac with Python 2.7 and 3.6.

$ green -vvvp test_djangorunner.py
Green 2.10.0, Coverage 4.3.4, Python 2.7.13

green.test.test_djangorunner
  TestDjangoMissing
.   Raises ImportError if Django is not available
  TestDjangoRunner
.   If no verbosity is passed, default value is set
.   Ensure that the python manage.py test command recognises the --green-verbosity flag
.   If no tests are found, we create an empty test suite and run it.
.   If no tests are found, we create an empty test suite and run it.
.   Bad input causes a ValueError to be raised
.   Labeled tests run okay
.   Not passing in a label causes the targets to be ['.']
.   Tests should run fine if verbosity is passed through CLI flag

Ran 9 tests in 0.516s

OK (passes=9)

So...weird.

CleanCut commented 7 years ago

Do you have a public repository that has the problem that I can look at?

4poc commented 7 years ago

Nothing public unfortunately but I will try to put something up tomorrow that shows the issue, thanks for the quick response! 😁

CleanCut commented 7 years ago

No problem!

CleanCut commented 6 years ago

Please feel free to re-open this request if you are able to provide some code that exhibits the problem you described.