CleanCut / green

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

Added --test-pattern option #49

Closed hindman closed 9 years ago

hindman commented 9 years ago

Here's a new pull request, to continue the discussion started in this one: https://github.com/CleanCut/green/pull/46

As always, thanks for taking a look at this.

coveralls commented 9 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling 4e747e58173893a1f784b5d4d11c60d90bc4fd2d on hindman:test-pattern into 5de277f2428d61d7c49f49473be2c3e833acfe8a on CleanCut:master.

coveralls commented 9 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling 4e747e58173893a1f784b5d4d11c60d90bc4fd2d on hindman:test-pattern into 5de277f2428d61d7c49f49473be2c3e833acfe8a on CleanCut:master.

coveralls commented 9 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling 4e747e58173893a1f784b5d4d11c60d90bc4fd2d on hindman:test-pattern into 5de277f2428d61d7c49f49473be2c3e833acfe8a on CleanCut:master.

CleanCut commented 9 years ago

Hmmm. --file-pattern is implemented as glob-style matching, like bash. --test-pattern is implemented as a regular expression.

I am pondering whether we should make them both the same style of pattern or not. Seems a bit inconsistent to alternate between pattern matching styles. What are your thoughts?

CleanCut commented 9 years ago

Hmm, well whatever we decide, this looks great. I'll merge it in and then if we decide to change it, we'll change it.

hindman commented 9 years ago

I agree, they should be the same. I sort of lean toward regex, since it's more powerful, and most users are programmers. But it's only a mild preference. A glob pattern would satisfy most practical use cases. In fact, I often copy a method name to my clipboard from my editor and want to run a single test. Feel free to change it any way you like (or ping me to implement the desired change). Thanks.

CleanCut commented 9 years ago

Okay, so I ended up reverting your pull request and going in another direction. Take a look and see what you think. I overhauled most things pattern-related:

Let me know what you think.

hindman commented 9 years ago

@CleanCut Sounds great to me.