Guard junction

This commit is contained in:
WQY\qiong
2023-03-22 20:47:16 +08:00
parent 5e69ada90b
commit e68154ea0b
2 changed files with 19 additions and 1 deletions

View File

@@ -249,6 +249,8 @@ class TestApi:
p = 'test_junction'
self.enter(p)
assert get_junction(p, 'j0') == {}
add_junction(p, ChangeSet({'id': 'j0', 'x': 0.0, 'y': 10.0, 'elevation': 20.0}))
j0 = get_junction(p, 'j0')
assert j0['x'] == 0.0
@@ -284,6 +286,8 @@ class TestApi:
nodes = get_nodes(p)
assert len(nodes) == 0
assert get_junction(p, 'j0') == {}
add_junction(p, ChangeSet({'id': 'j1', 'x': 0.0, 'y': 10.0, 'elevation': 20.0}))
add_junction(p, ChangeSet({'id': 'j2', 'x': 0.0, 'y': 10.0, 'elevation': 20.0}))
add_junction(p, ChangeSet({'id': 'j3', 'x': 0.0, 'y': 10.0, 'elevation': 20.0}))