예제 #1
0
 def test_atomic_file(self):
     af1 = AtomicFile("tmp.txt")
     af2 = AtomicFile("tmp.txt")
     af1.write_atomic(six.b("foo"))
     af2.write_atomic(six.b("bar"))
     self.assertEqual(af1.read_atomic(), six.b("bar"))
     self.assertEqual(af2.read_atomic(), six.b("bar"))
     local.path("tmp.txt").delete()
예제 #2
0
 def test_atomic_file(self):
     af1 = AtomicFile("tmp.txt")
     af2 = AtomicFile("tmp.txt")
     af1.write_atomic(six.b("foo"))
     af2.write_atomic(six.b("bar"))
     self.assertEqual(af1.read_atomic(), six.b("bar"))
     self.assertEqual(af2.read_atomic(), six.b("bar"))
     local.path("tmp.txt").delete()
예제 #3
0
 def test_atomic_file(self):
     af1 = AtomicFile("tmp.txt")
     af2 = AtomicFile("tmp.txt")
     af1.write_atomic(b"foo")
     af2.write_atomic(b"bar")
     assert af1.read_atomic() == b"bar"
     assert af2.read_atomic() == b"bar"
     local.path("tmp.txt").delete()