Skip to content

Commit 5f8f31c

Browse files
committed
test files formatting; pin to setuptools<81 for pkg_resources usage
1 parent 0d8fd45 commit 5f8f31c

File tree

3 files changed

+11
-21
lines changed

3 files changed

+11
-21
lines changed

requirements-min.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Requirements for minimal tests
22
-r requirements.txt
3-
setuptools>=59.5.0
3+
setuptools>=59.5.0,<81.0.0 # pkg_resources deprecation
44
coverage>=5.5
55
parameterized

tests/fixtures/runner_fixtures.py

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,7 @@ def sample_map_name():
3636

3737
@pytest.fixture(scope="session")
3838
def faux_app_manifest():
39-
app_manifest = json.loads(
40-
"""{
39+
app_manifest = json.loads("""{
4140
"command": "/usr/bin/python3 -u /opt/monai/app/main.py",
4241
"input": {
4342
"path": "input",
@@ -63,15 +62,13 @@ def faux_app_manifest():
6362
},
6463
"timeout": 600,
6564
"working-directory": "/var/monai"
66-
}"""
67-
)
65+
}""")
6866
yield app_manifest
6967

7068

7169
@pytest.fixture(scope="session")
7270
def faux_pkg_manifest_with_gpu():
73-
pkg_manifest = json.loads(
74-
"""{
71+
pkg_manifest = json.loads("""{
7572
"sdk-version": "0.0.0",
7673
"models": [
7774
{
@@ -85,15 +82,13 @@ def faux_pkg_manifest_with_gpu():
8582
"memory": "4Gi"
8683
}
8784
}
88-
"""
89-
)
85+
""")
9086
yield pkg_manifest
9187

9288

9389
@pytest.fixture(scope="session")
9490
def faux_pkg_manifest():
95-
pkg_manifest = json.loads(
96-
"""{
91+
pkg_manifest = json.loads("""{
9792
"sdk-version": "0.0.0",
9893
"models": [
9994
{
@@ -106,16 +101,14 @@ def faux_pkg_manifest():
106101
"memory": "4Gi"
107102
}
108103
}
109-
"""
110-
)
104+
""")
111105
yield pkg_manifest
112106

113107

114108
@pytest.fixture(scope="session")
115109
def faux_app_manifest_with_absolute_path():
116110
"""App manifest with absolute input and output paths"""
117-
app_manifest = json.loads(
118-
"""{
111+
app_manifest = json.loads("""{
119112
"command": "/usr/bin/python3 -u /opt/monai/app/main.py",
120113
"input": {
121114
"path": "/input",
@@ -141,8 +134,7 @@ def faux_app_manifest_with_absolute_path():
141134
},
142135
"timeout": 600,
143136
"working-directory": "/var/monai"
144-
}"""
145-
)
137+
}""")
146138
yield app_manifest
147139

148140

tools/pipeline-generator/tests/test_cli.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -142,13 +142,11 @@ def test_list_command_with_config(self):
142142
with self.runner.isolated_filesystem():
143143
# Create a test config file
144144
with open("test_config.yaml", "w") as f:
145-
f.write(
146-
"""
145+
f.write("""
147146
endpoints:
148147
- organization: "TestOrg"
149148
description: "Test organization"
150-
"""
151-
)
149+
""")
152150

153151
# Run command with config file
154152
with patch("pipeline_generator.cli.main.HuggingFaceClient") as mock_client_class:

0 commit comments

Comments
 (0)