summaryrefslogtreecommitdiffstats
path: root/tests/test_main.py
diff options
context:
space:
mode:
authorDavid Szotten <davidszotten@gmail.com>2016-02-03 22:28:04 +0000
committerDavid Szotten <davidszotten@gmail.com>2016-02-03 22:28:04 +0000
commit85181ab25280c44409ced27a50c84f8f722d9194 (patch)
treeb7109e6ac3489849adcc3397bbb07ec63df865ca /tests/test_main.py
parent43a13ba06557ec109ab723d5e084878942ea6386 (diff)
factor out `ensure_dir_exists` and use for log
Diffstat (limited to 'tests/test_main.py')
-rw-r--r--tests/test_main.py18
1 files changed, 0 insertions, 18 deletions
diff --git a/tests/test_main.py b/tests/test_main.py
index a30d1164..add1f7aa 100644
--- a/tests/test_main.py
+++ b/tests/test_main.py
@@ -78,26 +78,8 @@ def test_i_works(tmpdir, executor):
run(executor, statement, pgspecial=cli.pgspecial)
-def test_existing_rc_dir(tmpdir):
- rcfile = str(tmpdir.mkdir("subdir").join("rcfile"))
-
- PGCli(pgclirc_file=rcfile)
- assert os.path.exists(rcfile)
-
-
def test_missing_rc_dir(tmpdir):
rcfile = str(tmpdir.join("subdir").join("rcfile"))
PGCli(pgclirc_file=rcfile)
assert os.path.exists(rcfile)
-
-
-def test_other_rcdir_create_error(tmpdir):
- subdir = tmpdir.join("subdir")
- rcfile = subdir.join("rcfile")
-
- # trigger an oserror that isn't "directory already exists"
- os.chmod(str(tmpdir), stat.S_IREAD)
-
- with pytest.raises(OSError):
- PGCli(pgclirc_file=str(rcfile))