Update test__opcode and _Py_GetSpecializationStats with recent specialization stat changes (GH-27728)

This commit is contained in:
Irit Katriel 2021-08-11 17:34:01 +01:00 committed by GitHub
parent 08caf2d5d4
commit 64a7812c17
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View file

@ -82,10 +82,12 @@ class SpecializationStatsTests(unittest.TestCase):
self.assertCountEqual(stats.keys(), specialized_opcodes)
self.assertCountEqual(
stats['load_attr'].keys(),
stat_names + ['fails'])
stat_names + ['specialization_failure_kinds'])
for sn in stat_names:
self.assertIsInstance(stats['load_attr'][sn], int)
self.assertIsInstance(stats['load_attr']['specialization_failure_kinds'], tuple)
self.assertIsInstance(
stats['load_attr']['specialization_failure_kinds'],
tuple)
for v in stats['load_attr']['specialization_failure_kinds']:
self.assertIsInstance(v, int)