(mcls, name, bases, dct, *, source_date_epoch)
| 36 | # Run tests with SOURCE_DATE_EPOCH set or unset explicitly. |
| 37 | class 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 | |
| 53 | class PyCompileTestsBase: |
nothing calls this directly
no test coverage detected