Files
SeedPass/test_atomic_write_perms.py
T
google-labs-jules[bot]andPR0M3TH3AN 5e9ff2ab8f chore(style-agent): format code and update task logs
- Ran `black .` to reformat Python files:
  - src/seedpass/core/display_service.py
  - src/seedpass/core/manager.py
  - src/seedpass/core/password_generation.py
  - src/tests/test_stats_manager.py
  - test_atomic_write_perms.py
- Verified with `pytest` (766 passed) and `npm run lint`.
- Updated `.scheduler-memory/latest/daily/memories.md` with execution details.
- Added daily task log: `torch/task-logs/daily/2026-02-27T...__style-agent__completed.md`.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-27 00:14:18 +00:00

36 lines
762 B
Python

import sys
from pathlib import Path
# Add src/utils to path to import atomic_write directly
sys.path.append(str(Path("src/utils").resolve()))
from atomic_write import atomic_write
import os
import stat
def test_atomic_write_permissions():
test_file = Path("test_permissions.txt")
if test_file.exists():
test_file.unlink()
def write_op(f):
f.write("content")
atomic_write(test_file, write_op)
st = test_file.stat()
mode = stat.S_IMODE(st.st_mode)
print(f"File permissions: {oct(mode)}")
if mode == 0o600:
print("SUCCESS: Permissions are 0o600")
else:
print(f"FAILURE: Permissions are {oct(mode)}")
test_file.unlink()
if __name__ == "__main__":
test_atomic_write_permissions()