annotate tests/test_atomicwrite.py @ 0:dc90512b9c98

boilerplate
author Jeff Hammel <k0scist@gmail.com>
date Fri, 02 Jan 2015 13:08:39 -0800
parents
children a4188f41ca35
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
dc90512b9c98 boilerplate
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
1 #!/usr/bin/env python
dc90512b9c98 boilerplate
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
2
dc90512b9c98 boilerplate
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
3 """
dc90512b9c98 boilerplate
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
4 unit tests for AtomicWrite
dc90512b9c98 boilerplate
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
5 """
dc90512b9c98 boilerplate
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
6
dc90512b9c98 boilerplate
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
7 import os
dc90512b9c98 boilerplate
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
8 import sys
dc90512b9c98 boilerplate
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
9 import tempfile
dc90512b9c98 boilerplate
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
10 import unittest
dc90512b9c98 boilerplate
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
11
dc90512b9c98 boilerplate
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
12 class AtomicWriteUnitTest(unittest.TestCase):
dc90512b9c98 boilerplate
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
13
dc90512b9c98 boilerplate
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
14 def test_atomicwrite(self):
dc90512b9c98 boilerplate
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
15 tf = tempfile.mktemp()
dc90512b9c98 boilerplate
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
16 self.assertFalse(os.path.exists(tf))
dc90512b9c98 boilerplate
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
17
dc90512b9c98 boilerplate
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
18 if __name__ == '__main__':
dc90512b9c98 boilerplate
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
19 unittest.main()
dc90512b9c98 boilerplate
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
20