Skip to content

Commit 2d18a7f

Browse files
committed
Change from Simvue to Run class; tidying
1 parent 7c08008 commit 2d18a7f

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

tests/unit/test_simvue.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
import os
2-
from simvue import client
2+
from simvue import Run
33
import pytest
44

55
def test_suppress_errors():
66
"""
77
Check that errors are surpressed
88
"""
9-
simv = client.Simvue()
9+
run = Run()
1010

1111
with pytest.raises(RuntimeError, match="suppress_errors must be boolean"):
12-
simv.config(suppress_errors=200)
12+
run.config(suppress_errors=200)
1313

1414
def test_missing_config():
1515
"""
1616
Check for missing config
1717
"""
18-
simv = client.Simvue()
18+
run = Run()
1919

2020
with pytest.raises(RuntimeError, match="Unable to get URL and token from environment variables or config file"):
21-
simv.init()
21+
run.init()
2222

2323
def test_invalid_url():
2424
"""
@@ -27,10 +27,10 @@ def test_invalid_url():
2727
os.environ["SIMVUE_URL"] = "localhost"
2828
os.environ["SIMVUE_TOKEN"] = "test"
2929

30-
simv = client.Simvue()
30+
run = Run()
3131

3232
with pytest.raises(RuntimeError, match=r".*Invalid URL.*"):
33-
simv.init()
33+
run.init()
3434

3535
def test_cannot_connect():
3636
"""
@@ -39,7 +39,7 @@ def test_cannot_connect():
3939
os.environ["SIMVUE_URL"] = "http://localhost"
4040
os.environ["SIMVUE_TOKEN"] = "test"
4141

42-
simv = client.Simvue()
42+
run = Run()
4343

4444
with pytest.raises(RuntimeError, match="Failed to establish a new connection"):
45-
simv.init()
45+
run.init()

0 commit comments

Comments
 (0)