Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(15)

Unified Diff: Lib/test/test_fnmatch.py

Issue 3055: combined patches from http://bugs.python.org/issue3187 (Closed) SVN Base: http://svn.python.org/view/*checkout*/python/branches/py3k/
Patch Set: One more tweak (fold some long lines) Created 1 year, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side by-side-diff with in-line comments
Download patch
Index: Lib/test/test_fnmatch.py
===================================================================
--- Lib/test/test_fnmatch.py (revision 66736)
+++ Lib/test/test_fnmatch.py (working copy)
@@ -37,6 +37,15 @@
check('a', r'[!\]')
check('\\', r'[!\]', 0)
+ def test_mix_bytes_str(self):
+ self.assertRaises(TypeError, fnmatch, 'test', b'*')
+ self.assertRaises(TypeError, fnmatch, b'test', '*')
+ self.assertRaises(TypeError, fnmatchcase, 'test', b'*')
+ self.assertRaises(TypeError, fnmatchcase, b'test', '*')
+
+ def test_bytes(self):
+ self.check_match(b'test', b'te*')
+ self.check_match(b'test\xff', b'te*\xff')
def test_main():
support.run_unittest(FnmatchTestCase)

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld r497