Fix module in terms of python style

This commit is contained in:
wqy
2022-09-02 18:33:33 +08:00
parent 4474f12d2c
commit bed5741558
11 changed files with 214 additions and 185 deletions

44
api/test/s0_base.py Normal file
View File

@@ -0,0 +1,44 @@
from api.project import *
from api.s0_base import *
p = "test_s0_base"
n_1 = "n_1"
l_1 = "l_1"
c_1 = "c_1"
p_1 = "p_1"
if is_project_open(p):
close_project(p)
if have_project(p):
delete_project(p)
create_project(p)
open_project(p)
add_node(p, n_1, JUNCTION)
print(get_node(p, n_1))
if have_node(p, n_1):
delete_node(p, n_1)
print(have_node(p, n_1))
add_link(p, l_1, PIPE)
print(get_link(p, l_1))
if have_link(p, l_1):
delete_link(p, l_1)
print(have_link(p, l_1))
add_curve(p, c_1)
print(get_curve(p, c_1))
if have_curve(p, c_1):
delete_curve(p, c_1)
print(have_curve(p, c_1))
add_pattern(p, p_1)
print(get_pattern(p, p_1))
if have_pattern(p, p_1):
delete_pattern(p, p_1)
print(have_pattern(p, p_1))
close_project(p)
delete_project(p)