summaryrefslogtreecommitdiff
path: root/Lib/unittest/test/test_assertions.py
diff options
context:
space:
mode:
authorSteve Dower <steve.dower@microsoft.com>2017-02-04 15:39:38 -0800
committerSteve Dower <steve.dower@microsoft.com>2017-02-04 15:39:38 -0800
commit1a5780aabb550cae175ad8711e2f33ba644d0ddb (patch)
tree68e47eaafb4ccc17bbdb7668c6058984945b332d /Lib/unittest/test/test_assertions.py
parent956c7cfa7111ab5458e2f69868a05b7b84fc6843 (diff)
parentd1d8706cdb77e2adbbb4110338dcda0e1811f892 (diff)
downloadcpython-1a5780aabb550cae175ad8711e2f33ba644d0ddb.tar.gz
Issue #29319: Prevent RunMainFromImporter overwriting sys.path[0].
Diffstat (limited to 'Lib/unittest/test/test_assertions.py')
-rw-r--r--Lib/unittest/test/test_assertions.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/Lib/unittest/test/test_assertions.py b/Lib/unittest/test/test_assertions.py
index e6e2bc2ca7..1b0e83312d 100644
--- a/Lib/unittest/test/test_assertions.py
+++ b/Lib/unittest/test/test_assertions.py
@@ -240,7 +240,7 @@ class TestLongMessage(unittest.TestCase):
# Error messages are multiline so not testing on full message
# assertTupleEqual and assertListEqual delegate to this method
self.assertMessages('assertSequenceEqual', ([], [None]),
- ["\+ \[None\]$", "^oops$", r"\+ \[None\]$",
+ [r"\+ \[None\]$", "^oops$", r"\+ \[None\]$",
r"\+ \[None\] : oops$"])
def testAssertSetEqual(self):
@@ -250,21 +250,21 @@ class TestLongMessage(unittest.TestCase):
def testAssertIn(self):
self.assertMessages('assertIn', (None, []),
- ['^None not found in \[\]$', "^oops$",
- '^None not found in \[\]$',
- '^None not found in \[\] : oops$'])
+ [r'^None not found in \[\]$', "^oops$",
+ r'^None not found in \[\]$',
+ r'^None not found in \[\] : oops$'])
def testAssertNotIn(self):
self.assertMessages('assertNotIn', (None, [None]),
- ['^None unexpectedly found in \[None\]$', "^oops$",
- '^None unexpectedly found in \[None\]$',
- '^None unexpectedly found in \[None\] : oops$'])
+ [r'^None unexpectedly found in \[None\]$', "^oops$",
+ r'^None unexpectedly found in \[None\]$',
+ r'^None unexpectedly found in \[None\] : oops$'])
def testAssertDictEqual(self):
self.assertMessages('assertDictEqual', ({}, {'key': 'value'}),
[r"\+ \{'key': 'value'\}$", "^oops$",
- "\+ \{'key': 'value'\}$",
- "\+ \{'key': 'value'\} : oops$"])
+ r"\+ \{'key': 'value'\}$",
+ r"\+ \{'key': 'value'\} : oops$"])
def testAssertDictContainsSubset(self):
with warnings.catch_warnings():