diff --git a/tests/test_tempdir.py b/tests/test_tempdir.py
index 742f3fc169d547fe94b027aea63815cfe7b634fb..bd3f9a5c4365e1c01f64728f4d535cb3bb0520b5 100644
--- a/tests/test_tempdir.py
+++ b/tests/test_tempdir.py
@@ -31,3 +31,12 @@ def test_tempdir():
         assert op.realpath(os.getcwd()) == op.realpath(td)
 
     assert not op.exists(d)
+
+
+def test_tempdir_root():
+
+    # this first tempdir is then used
+    # as the root for another temp dir
+    with tempdir.tempdir() as root:
+        with tempdir.tempdir(root=root) as td:
+            assert op.dirname(td) == root