diff options
| author | Ned Batchelder <ned@nedbatchelder.com> | 2013-09-16 22:00:50 -0400 |
|---|---|---|
| committer | Ned Batchelder <ned@nedbatchelder.com> | 2013-09-16 22:00:50 -0400 |
| commit | 02f3c994f997a60588631f970c96d47f577f613d (patch) | |
| tree | 8958893a7c6cf987ca4fab2ed413733eb68b6947 | |
| parent | ddd70cf9d5269b43bd5815a52d1ab04e2860e2f7 (diff) | |
| parent | 3e1afb3a75bf68517fa2436af4e04acbfacb246a (diff) | |
| download | python-coveragepy-02f3c994f997a60588631f970c96d47f577f613d.tar.gz | |
Automated merge with ssh://bitbucket.org/ned/coveragepy
| -rw-r--r-- | coverage/files.py | 4 | ||||
| -rw-r--r-- | tests/test_files.py | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/coverage/files.py b/coverage/files.py index 8d154c6..976db4e 100644 --- a/coverage/files.py +++ b/coverage/files.py @@ -290,7 +290,7 @@ def find_python_files(dirname): continue for filename in filenames: # We're only interested in files that look like reasonable Python - # files: Must end with .py, and must not have certain funny + # files: Must end with .py or .pyw, and must not have certain funny # characters that probably mean they are editor junk. - if re.match(r"^[^.#~!$@%^&*()+=,]+\.py$", filename): + if re.match(r"^[^.#~!$@%^&*()+=,]+\.pyw?$", filename): yield os.path.join(dirpath, filename) diff --git a/tests/test_files.py b/tests/test_files.py index eeb2264..d247a39 100644 --- a/tests/test_files.py +++ b/tests/test_files.py @@ -167,8 +167,10 @@ class FindPythonFilesTest(CoverageTest): self.make_file("sub/ssub/s.py") self.make_file("sub/ssub/~s.py") # nope: editor effluvia self.make_file("sub/lab/exp.py") # nope: no __init__.py + self.make_file("sub/windows.pyw") py_files = set(find_python_files("sub")) self.assert_same_files(py_files, [ "sub/a.py", "sub/b.py", "sub/ssub/__init__.py", "sub/ssub/s.py", + "sub/windows.pyw", ]) |
