@@ -59,7 +59,7 @@ def mlink(request: pytest.FixtureRequest):
5959
6060
6161@pytest .fixture (scope = "session" )
62- def mlink_bin (request : pytest .FixtureRequest ):
62+ def plm_bin (request : pytest .FixtureRequest ):
6363 """Provide the path to the PLM binary."""
6464 return request .config .getoption ("--plm-bin" ) or os .getenv ("TEST_PLM_BIN" )
6565
@@ -79,8 +79,8 @@ def drop_all_database(source_conn: MongoClient, target_conn: MongoClient):
7979PML_PROC : subprocess .Popen = None
8080
8181
82- def start_plm (mlink_bin : str ):
83- rv = subprocess .Popen ([mlink_bin , "--reset-state" , "--log-level=trace" ])
82+ def start_plm (plm_bin : str ):
83+ rv = subprocess .Popen ([plm_bin , "--reset-state" , "--log-level=trace" ])
8484 time .sleep (1 )
8585 return rv
8686
@@ -91,14 +91,14 @@ def stop_plm(proc: subprocess.Popen):
9191
9292
9393@pytest .fixture (scope = "session" , autouse = True )
94- def manage_plm_process (request : pytest .FixtureRequest , mlink_bin : str ):
94+ def manage_plm_process (request : pytest .FixtureRequest , plm_bin : str ):
9595 """Start plm before tests and terminate it after all tests."""
96- if not mlink_bin :
96+ if not plm_bin :
9797 yield
9898 return
9999
100100 global PML_PROC # pylint: disable=W0603
101- PML_PROC = start_plm (mlink_bin )
101+ PML_PROC = start_plm (plm_bin )
102102
103103 def teardown ():
104104 if PML_PROC and PML_PROC .poll () is None :
@@ -117,12 +117,12 @@ def pytest_runtest_makereport(item, call): # pylint: disable=W0613
117117
118118
119119@pytest .fixture (autouse = True )
120- def restart_plm_on_failure (request : pytest .FixtureRequest , mlink_bin : str ):
120+ def restart_plm_on_failure (request : pytest .FixtureRequest , plm_bin : str ):
121121 yield
122122
123123 if hasattr (request .node , "rep_call" ) and request .node .rep_call .failed :
124124 # the test failed. restart plm process with a new state
125125 global PML_PROC # pylint: disable=W0603
126- if PML_PROC and mlink_bin :
126+ if PML_PROC and plm_bin :
127127 stop_plm (PML_PROC )
128- PML_PROC = start_plm (mlink_bin )
128+ PML_PROC = start_plm (plm_bin )
0 commit comments