Ned Batchelder avatar Ned Batchelder committed c27d246 Merge

Automated merge with ssh://bitbucket.org/ned/coveragepy

Comments (0)

Files changed (2)

coverage/files.py

             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)

tests/test_files.py

         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",
             ])
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.