Skip to content

Commit 171085a

Browse files
committed
call MODULE LIST once
1 parent e9ba8d6 commit 171085a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

test/test.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919

2020
TITLES_CSV = os.path.abspath(os.path.dirname(__file__)) + '/titles.csv'
2121

22+
v = 0
23+
2224
def waitForIndex(env, idx, timeout=None):
2325
delay = 0.1
2426
while True:
@@ -38,7 +40,9 @@ def waitForIndex(env, idx, timeout=None):
3840
break
3941

4042
def check_version(env, version):
41-
v = env.execute_command('MODULE LIST')[0][3]
43+
global v
44+
if v == 0:
45+
v = env.execute_command('MODULE LIST')[0][3]
4246
if int(v) >= version:
4347
return True
4448
return False

0 commit comments

Comments
 (0)