Skip to content

Commit 24fc335

Browse files
committed
More fixing tests
1 parent 9a90a31 commit 24fc335

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

tests/test_builder.py

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77
@pytest.mark.parametrize(
88
"attr, expected",
99
[
10-
("beamline.dom", "bl01t"),
11-
("beamline.desc", "Test Beamline"),
10+
("dom", "bl01t"),
11+
("desc", "Test Beamline"),
1212
],
1313
)
1414
def test_beamline_attributes(builder, attr, expected):
15-
assert getattr(builder, attr) == expected
15+
assert getattr(builder.beamline, attr) == expected
1616

1717

1818
@pytest.mark.parametrize(
@@ -22,9 +22,9 @@ def test_beamline_attributes(builder, attr, expected):
2222
(
2323
4,
2424
"motor",
25-
"Hexapod Stage",
26-
"BL01T-MO-MAP-01",
27-
"STAGE",
25+
"Motor Stage",
26+
"BL01T-MO-MOTOR-01",
27+
None,
2828
None,
2929
None,
3030
),
@@ -45,26 +45,29 @@ def test_component_attributes(builder, index, name, desc, P, R, attribute, extra
4545
"index, type, desc, P, M, R",
4646
[
4747
(0, "pmac.GeoBrick", None, "BL01T-MO-BRICK-01", None, None),
48-
(0, "pmac.autohome", None, "BL01T-MO-MAP-01:STAGE", None, None),
48+
(0, "pmac.autohome", None, "BL01T-MO-MOTOR-01", None, None),
4949
(
5050
1,
5151
"pmac.dls_pmac_asyn_motor",
5252
None,
53-
"BL01T-MO-MAP-01:STAGE",
53+
"BL01T-MO-MOTOR-01",
5454
"X",
5555
None,
5656
),
5757
(
5858
2,
5959
"pmac.dls_pmac_asyn_motor",
6060
None,
61-
"BL01T-MO-MAP-01:STAGE",
61+
"BL01T-MO-MOTOR-01",
6262
"A",
6363
None,
6464
),
6565
],
6666
)
6767
def test_gb_extract_entities(builder, index, type, desc, P, M, R):
68+
builder._extract_entities(
69+
builder._services_dir.joinpath("bl01t-mo-ioc-01/config/ioc.yaml")
70+
)
6871
entity = builder.entities[P][index]
6972
assert entity.type == type
7073
assert entity.desc == desc

0 commit comments

Comments
 (0)