From 7bb881aa3980f5eba5199c3f52ef171bf6e6d201 Mon Sep 17 00:00:00 2001 From: bunkerity Date: Wed, 20 Jul 2022 16:26:53 +0200 Subject: [PATCH] tests - fix rename --- tests/Test.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tests/Test.py b/tests/Test.py index 52e0aeada..314077306 100644 --- a/tests/Test.py +++ b/tests/Test.py @@ -5,7 +5,7 @@ from requests import get from traceback import format_exc from shutil import copytree from os.path import isdir, join -from os import mkdir, makedirs, walk, chmod +from os import mkdir, makedirs, walk, chmod, rename from re import sub, search, MULTILINE from datetime import datetime from subprocess import run @@ -126,7 +126,6 @@ class Test(ABC) : for root, dirs, files in walk(path) : for name in dirs + files : full_path = join(root, name) - if old in full_path : - new_path = sub(old, new, full_path) - if full_path != new_path : - rename(full_path, new_path) \ No newline at end of file + new_path = sub(old, new, full_path) + if full_path != new_path : + rename(full_path, new_path) \ No newline at end of file