Skip to content

Commit b9ecf97

Browse files
committed
exclude test_grammar.py from test_write_filtered_python_package
1 parent f8e4f56 commit b9ecf97

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Lib/test/test_zipfile/test_core.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1424,8 +1424,10 @@ def test_write_filtered_python_package(self):
14241424

14251425
# then check that the filter works on individual files
14261426
def filter(path):
1427-
return not os.path.basename(path).startswith("bad")
1428-
with captured_stdout() as reportSIO, self.assertWarns(UserWarning):
1427+
basename = os.path.basename(path)
1428+
return not (basename.startswith("bad") or basename != "test_grammar.py")
1429+
1430+
with captured_stdout() as reportSIO:
14291431
zipfp.writepy(packagedir, filterfunc=filter)
14301432
reportStr = reportSIO.getvalue()
14311433
if reportStr:

0 commit comments

Comments
 (0)