summaryrefslogtreecommitdiffstats
path: root/Lib/unittest/case.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/unittest/case.py')
-rw-r--r--Lib/unittest/case.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/unittest/case.py b/Lib/unittest/case.py
index 87fb02b..bedbc67 100644
--- a/Lib/unittest/case.py
+++ b/Lib/unittest/case.py
@@ -143,7 +143,7 @@ class _AssertRaisesBaseContext(_BaseTestCaseContext):
self.obj_name = str(callable_obj)
else:
self.obj_name = None
- if isinstance(expected_regex, (bytes, str)):
+ if expected_regex is not None:
expected_regex = re.compile(expected_regex)
self.expected_regex = expected_regex
self.msg = None