We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9b438a5 commit 774dd98Copy full SHA for 774dd98
Lib/test/test_zipfile/test_core.py
@@ -1424,10 +1424,8 @@ def test_write_filtered_python_package(self):
1424
1425
# then check that the filter works on individual files
1426
def filter(path):
1427
- basename = os.path.basename(path)
1428
- return not (basename.startswith("bad") or basename != "test_grammar.py")
1429
-
1430
- with captured_stdout() as reportSIO:
+ return not os.path.basename(path).startswith("bad")
+ with captured_stdout() as reportSIO, self.assertWarns(UserWarning):
1431
zipfp.writepy(packagedir, filterfunc=filter)
1432
reportStr = reportSIO.getvalue()
1433
if reportStr:
0 commit comments