Răsfoiți Sursa

Fixed a deprecation warning on Python 3.

Tim Graham 11 ani în urmă
părinte
comite
c19bbefca2
1 a modificat fișierele cu 1 adăugiri și 1 ștergeri
  1. 1 1
      tests/utils_tests/test_lazyobject.py

+ 1 - 1
tests/utils_tests/test_lazyobject.py

@@ -218,7 +218,7 @@ class SimpleLazyObjectTestCase(LazyObjectTestCase):
         obj = self.lazy_wrap(42)
         # __repr__ contains __repr__ of setup function and does not evaluate
         # the SimpleLazyObject
-        self.assertRegexpMatches(repr(obj), '^<SimpleLazyObject:')
+        six.assertRegex(self, repr(obj), '^<SimpleLazyObject:')
         self.assertIs(obj._wrapped, empty)  # make sure evaluation hasn't been triggered
 
         self.assertEqual(obj, 42)  # evaluate the lazy object