Kaydet (Commit) cae969e7 authored tarafından Victor Stinner's avatar Victor Stinner

fix test_unittest: ignore DeprecationWarning on assertDictContainsSubset()

üst 47f14bad
import datetime
import warnings
import unittest
......@@ -224,6 +224,9 @@ class TestLongMessage(unittest.TestCase):
"\+ \{'key': 'value'\} : oops$"])
def testAssertDictContainsSubset(self):
with warnings.catch_warnings():
warnings.simplefilter("ignore", DeprecationWarning)
self.assertMessages('assertDictContainsSubset', ({'key': 'value'}, {}),
["^Missing: 'key'$", "^oops$",
"^Missing: 'key'$",
......
......@@ -489,6 +489,9 @@ class Test_TestCase(unittest.TestCase, TestEquality, TestHashing):
animals)
def testAssertDictContainsSubset(self):
with warnings.catch_warnings():
warnings.simplefilter("ignore", DeprecationWarning)
self.assertDictContainsSubset({}, {})
self.assertDictContainsSubset({}, {'a': 1})
self.assertDictContainsSubset({'a': 1}, {'a': 1})
......
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