Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
fix regular expression for test files #429
Conversation
|
thanks for the fix! mind adding a quick test? should be easy to show with like |
|
Ok, submitted one. I cheated for the first fix and just did it in github's online editor :) |
|
I fixed up the test and made sure it failed first (had to adjust the filename slightly): $ pytest tests/tests_should_end_in_test_test.py
============================= test session starts ==============================
platform linux -- Python 3.6.8, pytest-5.3.1, py-1.8.0, pluggy-0.13.1
rootdir: /tmp/pre-commit-hooks
collected 8 items
tests/tests_should_end_in_test_test.py ..F..... [100%]
=================================== FAILURES ===================================
__________________________________ test_regex __________________________________
def test_regex():
> assert main(('foo_test_py',)) == 1
E AssertionError: assert 0 == 1
E + where 0 = main(('foo_test_py',))
tests/tests_should_end_in_test_test.py:15: AssertionError
========================= 1 failed, 7 passed in 0.03s ========================== |

Noticed this when reading the code -- the regular expression doesn't escape the . in the .py