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

Method __new__

Lib/test/test_py_compile.py:38–50  ·  view source on GitHub ↗
(mcls, name, bases, dct, *, source_date_epoch)

Source from the content-addressed store, hash-verified

36# Run tests with SOURCE_DATE_EPOCH set or unset explicitly.
37class SourceDateEpochTestMeta(type(unittest.TestCase)):
38 def __new__(mcls, name, bases, dct, *, source_date_epoch):
39 cls = super().__new__(mcls, name, bases, dct)
40
41 for attr in dir(cls):
42 if attr.startswith('test_'):
43 meth = getattr(cls, attr)
44 if source_date_epoch:
45 wrapper = with_source_date_epoch(meth)
46 else:
47 wrapper = without_source_date_epoch(meth)
48 setattr(cls, attr, wrapper)
49
50 return cls
51
52
53class PyCompileTestsBase:

Callers

nothing calls this directly

Calls 7

superClass · 0.85
dirFunction · 0.85
getattrFunction · 0.85
with_source_date_epochFunction · 0.85
setattrFunction · 0.85
startswithMethod · 0.45

Tested by

no test coverage detected