common/file_helpers: remove xx stuff (#30772)

* remove xx stuff

* cleanup
old-commit-hash: 1346704426ef247a74de3922da670e53251858d9
This commit is contained in:
Adeeb Shihadeh
2023-12-16 22:19:50 -08:00
committed by GitHub
parent 6161996653
commit 0bbffc86c0
2 changed files with 2 additions and 63 deletions
+1 -4
View File
@@ -2,7 +2,6 @@ import os
import unittest
from uuid import uuid4
from openpilot.common.file_helpers import atomic_write_on_fs_tmp
from openpilot.common.file_helpers import atomic_write_in_dir
@@ -11,14 +10,12 @@ class TestFileHelpers(unittest.TestCase):
path = f"/tmp/tmp{uuid4()}"
with atomic_write_func(path) as f:
f.write("test")
assert not os.path.exists(path)
with open(path) as f:
self.assertEqual(f.read(), "test")
os.remove(path)
def test_atomic_write_on_fs_tmp(self):
self.run_atomic_write_func(atomic_write_on_fs_tmp)
def test_atomic_write_in_dir(self):
self.run_atomic_write_func(atomic_write_in_dir)