File tree Expand file tree Collapse file tree 2 files changed +28
-0
lines changed
Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Original file line number Diff line number Diff line change 1+ type : pyaml.accelerator
2+ facility : ESRF
3+ machine : sr
4+ energy : 6e9
5+ simulators :
6+ - type : pyaml.lattice.simulator
7+ lattice : sr/lattices/ebs.mat
8+ name : design
9+ data_folder : /data/store
10+ arrays :
11+ - type : pyaml.arrays.magnet
12+ name : HCORR
13+ elements :
14+ - SH1A-C0?-H
15+ - SH1A-C02-H # duplicate name in array
16+ - type : pyaml.arrays.magnet
17+ name : VCORR
18+ elements :
19+ - SH1A-C01-V
20+ - SH1A-C02-V
21+ devices :
22+ - sr/quadrupoles/QF1AC01.yaml
23+ - sr/correctors/SH1AC01.yaml
24+ - sr/correctors/SH1AC02.yaml
Original file line number Diff line number Diff line change @@ -24,6 +24,10 @@ def test_tune(install_test_package):
2424 assert "element BPM_C04-06 already defined" in str (exc )
2525 assert "line 58, column 3" in str (exc )
2626
27+ with pytest .raises (PyAMLConfigException ) as exc :
28+ ml : Accelerator = Accelerator .load ("tests/config/bad_conf_duplicate_4.yaml" )
29+ assert "MagnetArray HCORR : duplicate name SH1A-C02-H @index 2" in str (exc )
30+
2731 sr : Accelerator = Accelerator .load ("tests/config/EBSTune.yaml" )
2832 m1 = sr .live .get_magnet ("QF1E-C04" )
2933 m2 = sr .design .get_magnet ("QF1A-C05" )
You can’t perform that action at this time.
0 commit comments