Skip to content

Commit 660f307

Browse files
committed
Update mlin_* to plm_*.
1 parent 136ed71 commit 660f307

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

tests/conftest.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -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):
7979
PML_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)

tests/test_selective.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77

88
def perform_with_options(source, mlink, phase: Runner.Phase, include_ns=None, exclude_ns=None):
99
"""Perform the PLM operation with the given options."""
10-
mlink_options = {}
10+
plm_options = {}
1111
if include_ns:
12-
mlink_options["include_namespaces"] = include_ns
12+
plm_options["include_namespaces"] = include_ns
1313
if exclude_ns:
14-
mlink_options["exclude_namespaces"] = exclude_ns
14+
plm_options["exclude_namespaces"] = exclude_ns
1515

16-
return Runner(source, mlink, phase, mlink_options)
16+
return Runner(source, mlink, phase, plm_options)
1717

1818

1919
def check_if_target_is_subset(source: MongoClient, target: MongoClient):

0 commit comments

Comments
 (0)