You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
424 B

  1. import pytest
  2. import shutil
  3. from pathlib import Path
  4. def fill_mock_backup_dir(rootdir: Path, target_dir: Path):
  5. for property_file in rootdir.glob("*.properties"):
  6. shutil.copy2(property_file, target_dir / property_file.name)
  7. for other_file in filter(
  8. lambda path: path.suffix != ".properties", rootdir.glob("*")
  9. ):
  10. dest = target_dir / other_file.name
  11. dest.touch(exist_ok=True)