MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_name_cleanup

Method test_name_cleanup

Lib/test/datetimetester.py:89–99  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

87 self.assertIn(attr, all_attrs)
88
89 def test_name_cleanup(self):
90 if '_Pure' in self.__class__.__name__:
91 self.skipTest('Only run for Fast C implementation')
92
93 datetime = datetime_module
94 names = set(name for name in dir(datetime)
95 if not name.startswith('__') and not name.endswith('__'))
96 allowed = set(['MAXYEAR', 'MINYEAR', 'date', 'datetime',
97 'datetime_CAPI', 'time', 'timedelta', 'timezone',
98 'tzinfo', 'UTC', 'sys'])
99 self.assertEqual(names - allowed, set([]))
100
101 def test_divide_and_round(self):
102 if '_Fast' in self.__class__.__name__:

Callers

nothing calls this directly

Calls 6

setFunction · 0.85
dirFunction · 0.85
skipTestMethod · 0.80
startswithMethod · 0.45
endswithMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected