diff --git a/Lib/test/test_argparse.py b/Lib/test/test_argparse.py index 9e1efa8427e..7479246cf57 100644 --- a/Lib/test/test_argparse.py +++ b/Lib/test/test_argparse.py @@ -4178,6 +4178,10 @@ def test_main(): category=DeprecationWarning) support.run_unittest(__name__) + # Remove global references to avoid looking like we have refleaks. + RFile.seen = {} + WFile.seen = set() + if __name__ == '__main__':