Castle: The best Real-Time/Embedded/HighTech language EVER. Attempt 2
修订版 | 135bf69feaf3c570c09b659f3c24a467ccc58fc3 (tree) |
---|---|
时间 | 2023-09-29 18:15:26 |
作者 | Albert Mietus < albert AT mietus DOT nl > |
Commiter | Albert Mietus < albert AT mietus DOT nl > |
small refactoring
@@ -45,7 +45,7 @@ | ||
45 | 45 | typedParameters: PTH.Optional[PTH.Sequence[TypedParameter]]=() |
46 | 46 | |
47 | 47 | |
48 | -@dataclass | |
48 | +@dataclass # pragma: no mutate | |
49 | 49 | class _RootProtocol(Protocol): |
50 | 50 | """This is the base protocol; it exist as we can't instantiate Protocol""" |
51 | 51 |
@@ -58,15 +58,15 @@ | ||
58 | 58 | def test_protocol_with_Noparms(emptyProtocol): |
59 | 59 | assert emptyProtocol.typedParameters == () |
60 | 60 | |
61 | -def test_protocol_with_parm(): | |
62 | - e = EventProtocol("WithParms", events=[], based_on=None, | |
61 | +def test_protocol_with_aParm(): | |
62 | + e = EventProtocol("With_a_parm", events=[], based_on=None, | |
63 | 63 | typedParameters=[TypedParameter(name='p', type=float)]) |
64 | 64 | assert len(e.typedParameters) ==1 |
65 | 65 | assert e.typedParameters[0].name == 'p' |
66 | 66 | assert e.typedParameters[0].type == float |
67 | 67 | |
68 | -def test_protocol_with_parm(): | |
69 | - e = EventProtocol("WithParms", events=[], based_on=None, | |
68 | +def test_protocol_with_4Parms(): | |
69 | + e = EventProtocol("With_4_Parms", events=[], based_on=None, | |
70 | 70 | typedParameters=( |
71 | 71 | TypedParameter(name='p0', type=float ), |
72 | 72 | TypedParameter(name='p1', type=int ), |