Skip to content

Commit 99f0271

Browse files
Fix regexps.
1 parent c945156 commit 99f0271

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Lib/test/test_warnings/__init__.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ def test_filter_module(self):
241241
MS_WINDOWS = (sys.platform == 'win32')
242242
with self.module.catch_warnings(record=True) as w:
243243
self.module.simplefilter('error')
244-
self.module.filterwarnings('always', module=r'package\.module\z')
244+
self.module.filterwarnings('always', module=r'package\.module\Z')
245245
self.module.warn_explicit('msg', UserWarning, 'filename', 42,
246246
module='package.module')
247247
self.assertEqual(len(w), 1)
@@ -264,7 +264,7 @@ def test_filter_module(self):
264264

265265
with self.module.catch_warnings(record=True) as w:
266266
self.module.simplefilter('error')
267-
self.module.filterwarnings('always', module=r'/path/to/package/module\z')
267+
self.module.filterwarnings('always', module=r'/path/to/package/module\Z')
268268
self.module.warn_explicit('msg', UserWarning, '/path/to/package/module', 42)
269269
self.assertEqual(len(w), 1)
270270
self.module.warn_explicit('msg', UserWarning, '/path/to/package/module.py', 42)
@@ -284,7 +284,7 @@ def test_filter_module(self):
284284

285285
with self.module.catch_warnings(record=True) as w:
286286
self.module.simplefilter('error')
287-
self.module.filterwarnings('always', module=r'/path/to/package/__init__\z')
287+
self.module.filterwarnings('always', module=r'/path/to/package/__init__\Z')
288288
self.module.warn_explicit('msg', UserWarning, '/path/to/package/__init__.py', 42)
289289
self.assertEqual(len(w), 1)
290290
self.module.warn_explicit('msg', UserWarning, '/path/to/package/__init__', 42)
@@ -293,7 +293,7 @@ def test_filter_module(self):
293293
if MS_WINDOWS:
294294
with self.module.catch_warnings(record=True) as w:
295295
self.module.simplefilter('error')
296-
self.module.filterwarnings('always', module=r'C:\\path\\to\\package\\module\z')
296+
self.module.filterwarnings('always', module=r'C:\\path\\to\\package\\module\Z')
297297
self.module.warn_explicit('msg', UserWarning, r'C:\path\to\package\module', 42)
298298
self.assertEqual(len(w), 1)
299299
self.module.warn_explicit('msg', UserWarning, r'C:\path\to\package\module.py', 42)
@@ -312,7 +312,7 @@ def test_filter_module(self):
312312

313313
with self.module.catch_warnings(record=True) as w:
314314
self.module.simplefilter('error')
315-
self.module.filterwarnings('always', module=r'<unknown>\z')
315+
self.module.filterwarnings('always', module=r'<unknown>\Z')
316316
self.module.warn_explicit('msg', UserWarning, '', 42)
317317
self.assertEqual(len(w), 1)
318318

0 commit comments

Comments
 (0)