Files
Marble-shell-theme/tests/_helpers/__init__.py
Vladyslav Hroshev 31e1a3deb9 TESTS TESTS ADDED MORE TEST TESTED GRESOURCES TESTS TESTS I LOVE TESTS SO MUCH
- Fully covered gresource orchestrator and it helpers with tests
- Use abstract command runner INSTEAD OF SUBPROCESS in gresources
- Replaced some subprocesses by builtin functions
2025-04-06 21:56:27 +03:00

14 lines
322 B
Python

import os
def create_dummy_file(file_path: str, content: str = "dummy content"):
os.makedirs(os.path.dirname(file_path), exist_ok=True)
with open(file_path, 'w') as f:
f.write(content)
def try_remove_file(file_path: str):
try:
os.remove(file_path)
except FileNotFoundError:
pass