dxf Endung aus der Eingabe entfernt. Funktionen benötigen nur basename

This commit is contained in:
2025-09-25 14:43:41 +02:00
parent 5b1a6ac333
commit cc655aaf9b
+7 -2
View File
@@ -42,10 +42,15 @@ class TestRunner:
def find_test_files(self):
"""Find DXF files in testdata directory - all files or specific file"""
if self.target_file:
# Remove .dxf suffix if present to avoid double extension
clean_target = self.target_file
if clean_target.endswith('.dxf'):
clean_target = clean_target[:-4]
# Check if specific file exists
target_dxf = self.testdata_dir / f"{self.target_file}.dxf"
target_dxf = self.testdata_dir / f"{clean_target}.dxf"
if target_dxf.exists():
return [self.target_file]
return [clean_target]
else:
print(f"Error: Test file {target_dxf} not found")
return []