Skip to content

Commit 2618b23

Browse files
committed
Fix tests
1 parent 54fd059 commit 2618b23

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

tests/test_builder.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
@pytest.fixture
1010
def gb():
11-
path = Path("example/bl01t-services/synoptic/create_gui.yaml")
11+
path = Path("example/bl01t-services/synoptic/techui.yaml")
1212
b = Builder(path)
1313
b._services_dir = Path("./example/bl01t-services/services")
1414
b.setup()
@@ -27,7 +27,7 @@ def test_beamline_attributes(gb: Builder, attr, expected):
2727

2828

2929
@pytest.mark.parametrize(
30-
"index, name, desc, P, R, attribute, extras",
30+
"index, name, desc, p, r, attribute, extras",
3131
[
3232
(0, "fshtr", "Fast Shutter", "BL01T-EA-FSHTR-01", None, None, None),
3333
(
@@ -41,19 +41,19 @@ def test_beamline_attributes(gb: Builder, attr, expected):
4141
),
4242
],
4343
)
44-
def test_component_attributes(gb: Builder, index, name, desc, P, R, attribute, extras):
44+
def test_component_attributes(gb: Builder, index, name, desc, p, r, attribute, extras):
4545
component = gb.components[index]
4646
assert component.name == name
4747
assert component.desc == desc
48-
assert component.P == P
49-
assert component.R == R
48+
assert component.P == p
49+
assert component.R == r
5050
assert component.attribute == attribute
5151
if extras is not None:
5252
assert component.extras == extras
5353

5454

5555
@pytest.mark.parametrize(
56-
"index, type, desc, P, M, R",
56+
"index, type, desc, p, m, r",
5757
[
5858
(0, "pmac.GeoBrick", None, "BL01T-MO-BRICK-01", None, None),
5959
(0, "pmac.autohome", None, "BL01T-MO-MAP-01:STAGE", None, None),
@@ -75,18 +75,18 @@ def test_component_attributes(gb: Builder, index, name, desc, P, R, attribute, e
7575
),
7676
],
7777
)
78-
def test_gb_extract_entities(gb: Builder, index, type, desc, P, M, R):
79-
entity = gb.entities[P][index]
78+
def test_gb_extract_entities(gb: Builder, index, type, desc, p, m, r):
79+
entity = gb.entities[p][index]
8080
assert entity.type == type
8181
assert entity.desc == desc
82-
assert entity.P == P
83-
assert entity.M == M
84-
assert entity.R == R
82+
assert entity.P == p
83+
assert entity.M == m
84+
assert entity.R == r
8585

8686

8787
def test_setup(gb: Builder):
8888
gb._services_dir = Path(f"example/{gb.beamline.dom}-services/services")
89-
gb._write_directory = Path("example/data")
89+
gb._write_directory = gb._services_dir.parent.joinpath("synoptic/opis")
9090
gb.generate_screens()
9191

9292
with open(f"./{gb._write_directory}/motor.bob") as f:

tests/test_files/motor.bob

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
<x>0</x>
3232
<y>150</y>
3333
</widget>
34-
<widget type="action_button" version="2.0.0">
34+
<widget type="action_button" version="3.0.0">
3535
<name>pmac.GeoBrick</name>
3636
<width>100</width>
3737
<height>40</height>

0 commit comments

Comments
 (0)