Update tests/integration/helpers/cluster.py

Co-authored-by: Azat Khuzhin <a3at.mail@gmail.com>
This commit is contained in:
Vitaly Baranov 2022-07-18 14:55:21 +02:00 committed by Vitaly Baranov
parent 15882b1d86
commit bd563c210e

View File

@ -242,10 +242,9 @@ def extract_test_name(base_path):
Must be unique in each test directory (because it's used to make instances dir and to stop docker containers from previous run) Must be unique in each test directory (because it's used to make instances dir and to stop docker containers from previous run)
""" """
name = p.basename(base_path) name = p.basename(base_path)
if name == "test.py": name = p.splitext(name)[0]
name = "" name = name.removeprefix('test')
elif name.startswith("test_") and name.endswith(".py"): name = name.strip('-_')
name = name[len("test_"):(len(name)-len(".py"))]
return name return name