summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Behnel <stefan_ml@behnel.de>2021-04-14 13:56:39 +0200
committerStefan Behnel <stefan_ml@behnel.de>2021-04-14 13:56:45 +0200
commitdd7fd780843efc014ccbe5844b10f3ac53395e76 (patch)
tree6bbdea8324888997f1eef25f059d924cf086f11b
parent66690e7cb2f3ec835b0889d62d2f90af3e179a0e (diff)
downloadcython-dd7fd780843efc014ccbe5844b10f3ac53395e76.tar.gz
Work around a test failure in Py3.10.
Closes https://github.com/cython/cython/pull/4101 See https://github.com/cython/cython/issues/4100
-rw-r--r--tests/run/test_unicode.pyx18
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/run/test_unicode.pyx b/tests/run/test_unicode.pyx
index 9d272dd5d..4616acf2c 100644
--- a/tests/run/test_unicode.pyx
+++ b/tests/run/test_unicode.pyx
@@ -1470,19 +1470,19 @@ class UnicodeTest(CommonTest,
class Str(str, enum.Enum):
ABC = 'abc'
# Testing Unicode formatting strings...
- self.assertEqual("%s, %s" % (Str.ABC, Str.ABC),
- 'Str.ABC, Str.ABC')
- self.assertEqual("%s, %s, %d, %i, %u, %f, %5.2f" %
+ self.assertEqual(("%s, %s" % (Str.ABC, Str.ABC)).replace("Str.", ""),
+ 'ABC, ABC')
+ self.assertEqual(("%s, %s, %d, %i, %u, %f, %5.2f" %
(Str.ABC, Str.ABC,
Int.IDES, Int.IDES, Int.IDES,
- Float.PI, Float.PI),
- 'Str.ABC, Str.ABC, 15, 15, 15, 3.141593, 3.14')
+ Float.PI, Float.PI)).replace("Str.", ""),
+ 'ABC, ABC, 15, 15, 15, 3.141593, 3.14')
# formatting jobs delegated from the string implementation:
- self.assertEqual('...%(foo)s...' % {'foo':Str.ABC},
- '...Str.ABC...')
- self.assertEqual('...%(foo)s...' % {'foo':Int.IDES},
- '...Int.IDES...')
+ self.assertEqual(('...%(foo)s...' % {'foo':Str.ABC}).replace("Str.", ""),
+ '...ABC...')
+ self.assertEqual(('...%(foo)s...' % {'foo':Int.IDES}).replace("Int.", ""),
+ '...IDES...')
self.assertEqual('...%(foo)i...' % {'foo':Int.IDES},
'...15...')
self.assertEqual('...%(foo)d...' % {'foo':Int.IDES},