summaryrefslogtreecommitdiff
path: root/tests/test_test.py
diff options
context:
space:
mode:
authorJannis Leidel <jannis@leidel.info>2012-09-01 16:19:19 +0200
committerJannis Leidel <jannis@leidel.info>2012-09-01 16:19:19 +0200
commit235e1dea02abd3a89ab53ea8035fd4ee8a37887b (patch)
tree5e7b2c5a853aefed870863bed9da6722100e2420 /tests/test_test.py
parent6083597ebebd05d28b57d53c6077bfa7c3b168f8 (diff)
parentb183a327412e83ac24a9c9d28a6bedd94bb69d7b (diff)
downloadpip-threaded-page-getting.tar.gz
Merge branch 'develop' into threaded-page-gettingthreaded-page-getting
Diffstat (limited to 'tests/test_test.py')
-rw-r--r--tests/test_test.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/test_test.py b/tests/test_test.py
index a52939575..498652d95 100644
--- a/tests/test_test.py
+++ b/tests/test_test.py
@@ -66,3 +66,24 @@ def test_sitecustomize_not_growing_in_fast_environment():
size2 = os.stat(sc2).st_size
assert size1==size2, "size before, %d != size after, %d" %(size1, size2)
+
+def test_tmp_dir_exists_in_env():
+ """
+ Test that $TMPDIR == env.temp_path and path exists, and env.assert_no_temp() passes
+ """
+ #need these tests to ensure the assert_no_temp feature of scripttest is working
+ env = reset_env(use_distribute=True)
+ env.assert_no_temp() #this fails if env.tmp_path doesn't exist
+ assert env.environ['TMPDIR'] == env.temp_path
+ assert isdir(env.temp_path)
+
+
+def test_tmp_dir_exists_in_fast_env():
+ """
+ Test that $TMPDIR == env.temp_path and path exists and env.assert_no_temp() passes (in fast env)
+ """
+ #need these tests to ensure the assert_no_temp feature of scripttest is working
+ env = reset_env()
+ env.assert_no_temp() #this fails if env.tmp_path doesn't exist
+ assert env.environ['TMPDIR'] == env.temp_path
+ assert isdir(env.temp_path)