Commit aa5c7bb9 authored by Zachary Ware's avatar Zachary Ware

Issue #23731: Fix tracemalloc test on Windows.

'a.pyo' can no longer match 'a.py', so 'a.PYO' can't either.
parent 429d6e75
...@@ -671,7 +671,6 @@ class TestFilters(unittest.TestCase): ...@@ -671,7 +671,6 @@ class TestFilters(unittest.TestCase):
self.assertTrue(fnmatch('aBcDe', 'Ab*dE')) self.assertTrue(fnmatch('aBcDe', 'Ab*dE'))
self.assertTrue(fnmatch('a.pyc', 'a.PY')) self.assertTrue(fnmatch('a.pyc', 'a.PY'))
self.assertTrue(fnmatch('a.PYO', 'a.py'))
self.assertTrue(fnmatch('a.py', 'a.PYC')) self.assertTrue(fnmatch('a.py', 'a.PYC'))
else: else:
# case sensitive # case sensitive
...@@ -679,7 +678,6 @@ class TestFilters(unittest.TestCase): ...@@ -679,7 +678,6 @@ class TestFilters(unittest.TestCase):
self.assertFalse(fnmatch('aBcDe', 'Ab*dE')) self.assertFalse(fnmatch('aBcDe', 'Ab*dE'))
self.assertFalse(fnmatch('a.pyc', 'a.PY')) self.assertFalse(fnmatch('a.pyc', 'a.PY'))
self.assertFalse(fnmatch('a.PYO', 'a.py'))
self.assertFalse(fnmatch('a.py', 'a.PYC')) self.assertFalse(fnmatch('a.py', 'a.PYC'))
if os.name == 'nt': if os.name == 'nt':
...@@ -695,6 +693,9 @@ class TestFilters(unittest.TestCase): ...@@ -695,6 +693,9 @@ class TestFilters(unittest.TestCase):
self.assertFalse(fnmatch(r'a/b\c', r'a\b/c')) self.assertFalse(fnmatch(r'a/b\c', r'a\b/c'))
self.assertFalse(fnmatch(r'a/b/c', r'a\b\c')) self.assertFalse(fnmatch(r'a/b/c', r'a\b\c'))
# as of 3.5, .pyo is no longer munged to .py
self.assertFalse(fnmatch('a.pyo', 'a.py'))
def test_filter_match_trace(self): def test_filter_match_trace(self):
t1 = (("a.py", 2), ("b.py", 3)) t1 = (("a.py", 2), ("b.py", 3))
t2 = (("b.py", 4), ("b.py", 5)) t2 = (("b.py", 4), ("b.py", 5))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment