Castle: The best Real-Time/Embedded/HighTech language EVER. Attempt 2
Revisión | f20c8f117f1ae015669cb4e7fc979e003102b638 (tree) |
---|---|
Tiempo | 2024-03-11 00:12:37 |
Autor | Albert Mietus < albert AT mietus DOT nl > |
Commiter | Albert Mietus < albert AT mietus DOT nl > |
refactored import-structure: handle it in other packages.Also: @pytest/skip generating Specialise Slowstart_1 -- need tto desiingn it first
@@ -1,7 +1,7 @@ | ||
1 | 1 | # (C) Albert Mietus, 2023. Part of Castle/CCastle project |
2 | 2 | |
3 | 3 | from castle.aigr import EventProtocol, Event, ID |
4 | -from castle.aigr.aid import TypedParameter, Argument, Specialise | |
4 | +from castle.aigr import TypedParameter, Argument, Specialise | |
5 | 5 | |
6 | 6 | |
7 | 7 | StartSieve = EventProtocol(ID('StartSieve'), |
@@ -5,7 +5,7 @@ | ||
5 | 5 | |
6 | 6 | import pytest |
7 | 7 | |
8 | -import castle.aigr as aigr | |
8 | +from castle import aigr | |
9 | 9 | from castle.TESTDOUBLES.aigr.sieve import protocols |
10 | 10 | from . import verify_Protocol |
11 | 11 |
@@ -15,7 +15,7 @@ | ||
15 | 15 | assert isinstance(p, aigr.EventProtocol) |
16 | 16 | |
17 | 17 | for p in (protocols.SlowStart_1,): |
18 | - assert isinstance(p, aigr.aid.Specialise) | |
18 | + assert isinstance(p, aigr.Specialise) | |
19 | 19 | assert isinstance(p.based_on, aigr.EventProtocol) |
20 | 20 | |
21 | 21 | def test_1_StartSieve(): |
@@ -33,7 +33,7 @@ | ||
33 | 33 | |
34 | 34 | def test_2_SlowStart_1(): |
35 | 35 | p = protocols.SlowStart_1 |
36 | - verify_Protocol(p, name="SlowStart_1", cls=aigr.aid.Specialise, base=protocols.SlowStart, event_names=['setMax']) | |
36 | + verify_Protocol(p, name="SlowStart_1", cls=aigr.Specialise, base=protocols.SlowStart, event_names=['setMax']) | |
37 | 37 | |
38 | 38 | |
39 | 39 |
@@ -21,6 +21,7 @@ | ||
21 | 21 | def test_02_SlowStart(generatedProtocol_verifier): |
22 | 22 | generatedProtocol_verifier(aigr_mocks=sieve.SlowStart, td=TstDoubles('protocols/slow_start'), strip_remarker=True) |
23 | 23 | |
24 | +@pytest.mark.xfail(reason="Need to design (the generated code) for Specialise/Generic Protocols") | |
24 | 25 | def test_03_SimpleSieve_withGeneric(generatedProtocol_verifier): |
25 | 26 | """``SimpleSieve`` depend on the instantiated generic ``SlowStart_1``. |
26 | 27 | They are in the same namespace and (so) need to be rendered in the same file. |