Extensibility
Ensure that the distributed package supports user extensions.
mypyc compilation can inadvertently seal classes, preventing inheritance.
This module verifies that reprospect extension points (e.g.,
reprospect.test.sass.instruction.InstructionMatcher) remain
subclassable after compilation, allowing users to extend reprospect capabilities.
- class tests.test_extensibility.CannotBeExtendedView on GitHub
Bases:
Fp32AddMatcherreprospect.test.sass.instruction.Fp32AddMatcherwas not marked as extensible.
- class tests.test_extensibility.NewInstructionMatcherView on GitHub
Bases:
InstructionMatcherFaking a matcher for some unforeseen use case.
- match(inst: str | Instruction) InstructionMatch | NoneView on GitHub
- class tests.test_extensibility.NewPatternMatcherView on GitHub
Bases:
PatternMatcherFaking a matcher for some unforeseen use case.
- __init__()View on GitHub
- class tests.test_extensibility.TestCannotBeExtendedView on GitHub
Bases:
object- test() NoneView on GitHub
- class tests.test_extensibility.TestInspectView on GitHub
Bases:
objectUse
inspectto retrieve the provenance of objects.- test_Instruction() NoneView on GitHub
- test_InstructionMatcher() NoneView on GitHub
- class tests.test_extensibility.TestInstructionMatchingView on GitHub
Bases:
objectMatch instructions with
NewInstructionMatcherandNewPatternMatcher.- CONTROLCODE: Final[ControlCode] = ControlCode(stall_count=5, yield_flag=False, read=7, write=7, wait=[True, False, False, False, False, False], reuse={'A': False, 'B': False, 'C': False, 'D': False})
- DADD: Final[Instruction] = Instruction(offset=0, instruction='DADD R4, R4, c[0x0][0x180]', hex='0x0', control=ControlCode(stall_count=5, yield_flag=False, read=7, write=7, wait=[True, False, False, False, False, False], reuse={'A': False, 'B': False, 'C': False, 'D': False}))
- DMUL: Final[Instruction] = Instruction(offset=0, instruction='DMUL R6, R6, c[0x0][0x188]', hex='0x1', control=ControlCode(stall_count=5, yield_flag=False, read=7, write=7, wait=[True, False, False, False, False, False], reuse={'A': False, 'B': False, 'C': False, 'D': False}))
- NOP: Final[Instruction] = Instruction(offset=0, instruction='NOP', hex='0x2', control=ControlCode(stall_count=5, yield_flag=False, read=7, write=7, wait=[True, False, False, False, False, False], reuse={'A': False, 'B': False, 'C': False, 'D': False}))
- test_NewInstructionMatcher() NoneView on GitHub
- test_NewPatternMatcher() NoneView on GitHub