Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

test_script: Fix path computation in find_js_test_files.

Anders Kaseorg0940f29a68ec
diff --git a/tools/lib/test_script.py b/tools/lib/test_script.py
index f9764f6c511..e2e862891d2 100644
--- a/tools/lib/test_script.py
+++ b/tools/lib/test_script.py
@@ -106,8 +106,12 @@ def find_js_test_files(test_dir: str, files: Iterable[str]) -> List[str]:
test_files = []
for file in files:
file = min(
- (file_name for file_name in os.listdir(test_dir) if file_name.startswith(file)),
- default=os.path.join(test_dir, file),
+ (
+ os.path.join(test_dir, file_name)
+ for file_name in os.listdir(test_dir)
+ if file_name.startswith(file)
+ ),
+ default=file,
)
test_files.append(os.path.abspath(file))