comparison tests/test_path.py @ 18:56596902e9ae default tip

add some setup + tests
author Jeff Hammel <k0scist@gmail.com>
date Sun, 10 Dec 2017 17:57:03 -0800
parents
children
comparison
equal deleted inserted replaced
17:4793f99b73e0 18:56596902e9ae
1 import os
2 from lemuriformes.path import TempDir
3
4
5 def test_tempdir_contextmanager():
6 """
7 ensure our temporary directory contextmanager works
8 and does what we want it to
9 """
10
11 tmpdir = None
12 with TempDir() as td:
13 tmpdir = td
14 assert os.path.exists(tmpdir)
15 assert os.path.isdir(tmpdir)
16 assert not os.path.exists(tmpdir)
17 assert not os.path.isdir(tmpdir)
18