We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5de04b4 commit db902bbCopy full SHA for db902bb
1 file changed
Tools/PythonTools/update_expected_output.py
@@ -0,0 +1,20 @@
1
+from pathlib import Path
2
+import shutil
3
+
4
5
+def copy_existing_files(test_path):
6
+ output_dir = Path(test_path) / "Output"
7
+ expected_dir = Path(test_path) / "ExpectedOutput"
8
9
+ if not output_dir.exists() or not expected_dir.exists():
10
+ print("One of the directories does not exist.")
11
+ return
12
13
+ for file in output_dir.iterdir():
14
+ if file.is_file():
15
+ target = expected_dir / file.name
16
+ if target.exists():
17
+ shutil.copy2(file, target)
18
+ print(f"Copied {file.name} to ExpectedOutput")
19
+ else:
20
+ print(f"Skipped {file.name} (not in ExpectedOutput)")
0 commit comments