Skip to content

Commit cd702b4

Browse files
committed
replace .removesuffix()
1 parent 49a3c2a commit cd702b4

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

tests/unit/sagemaker/image_uris/test_djl.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
)
2424
def test_djl_uris(load_config_and_file_name):
2525
config, file_name = load_config_and_file_name
26-
framework = file_name.removesuffix(".json")
26+
framework = file_name.split(".json")[0]
2727
VERSIONS = config["versions"]
2828
for version in VERSIONS:
2929
ACCOUNTS = config["versions"][version]["registries"]

tests/unit/sagemaker/image_uris/test_dlc_frameworks.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def test_chainer_uris(load_config):
6161
@pytest.mark.parametrize("scope", ["training", "inference", "eia"])
6262
def test_dlc_framework_uris(load_config_and_file_name, scope):
6363
config, file_name = load_config_and_file_name
64-
framework = file_name.removesuffix(".json")
64+
framework = file_name.split(".json")[0]
6565
VERSIONS = config[scope]["versions"]
6666

6767
for version in VERSIONS:
@@ -115,7 +115,7 @@ def test_dlc_framework_uris(load_config_and_file_name, scope):
115115
)
116116
def test_uncommon_format_dlc_framework_version_uris(load_config_and_file_name):
117117
config, file_name = load_config_and_file_name
118-
framework = file_name.removesuffix(".json")
118+
framework = file_name.split(".json")[0]
119119
py_versions = ["py2", "py3"]
120120

121121
# These versions are formatted differently than others for their framework

tests/unit/sagemaker/image_uris/test_graviton.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def _test_graviton_framework_uris(framework, version, py_version, account, regio
4545
@pytest.mark.parametrize("scope", ["inference_graviton"])
4646
def test_graviton_framework_uris(load_config_and_file_name, scope):
4747
config, file_name = load_config_and_file_name
48-
framework = file_name.removesuffix(".json")
48+
framework = file_name.split(".json")[0]
4949
VERSIONS = config[scope]["versions"]
5050
for version in VERSIONS:
5151
ACCOUNTS = config[scope]["versions"][version]["registries"]

tests/unit/sagemaker/image_uris/test_neo.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
@pytest.mark.parametrize("load_config_and_file_name", NEO_ALGOS, indirect=True)
3434
def test_neo_alogos(load_config_and_file_name):
3535
config, file_name = load_config_and_file_name
36-
algo = file_name.removesuffix(".json")
36+
algo = file_name.split(".json")[0]
3737
VERSIONS = config["versions"]
3838
for version in VERSIONS:
3939
ACCOUNTS = config["versions"][version]["registries"]
@@ -46,7 +46,7 @@ def test_neo_alogos(load_config_and_file_name):
4646
@pytest.mark.parametrize("load_config_and_file_name", NEO_AND_INFERENTIA_FRAMEWORKS, indirect=True)
4747
def test_neo_and_inferentia_frameworks(load_config_and_file_name):
4848
config, file_name = load_config_and_file_name
49-
framework = file_name.removesuffix(".json")
49+
framework = file_name.split(".json")[0]
5050
VERSIONS = config["versions"]
5151
processors = config["processors"]
5252
for version in VERSIONS:

tests/unit/sagemaker/image_uris/test_rl.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
)
3434
def test_rl_image_uris(load_config_and_file_name):
3535
config, filename = load_config_and_file_name
36-
framework = filename.removesuffix(".json")
36+
framework = filename.split(".json")[0]
3737
VERSIONS = config["versions"]
3838
processors = config["processors"]
3939
for version in VERSIONS:

0 commit comments

Comments
 (0)