##// END OF EJS Templates
skip test_not_writable_ipdir if I can't create a non-writable dir...
MinRK -
Show More
@@ -14,6 +14,7 b' from contextlib import contextmanager'
14
14
15 from os.path import join, abspath, split
15 from os.path import join, abspath, split
16
16
17 from nose import SkipTest
17 import nose.tools as nt
18 import nose.tools as nt
18
19
19 from nose import with_setup
20 from nose import with_setup
@@ -471,6 +472,14 b' def test_not_writable_ipdir():'
471 ipdir = os.path.join(tmpdir, '.ipython')
472 ipdir = os.path.join(tmpdir, '.ipython')
472 os.mkdir(ipdir)
473 os.mkdir(ipdir)
473 os.chmod(ipdir, 600)
474 os.chmod(ipdir, 600)
475 try:
476 os.listdir(ipdir)
477 except OSError:
478 pass
479 else:
480 # I can still read an unreadable dir,
481 # assume I'm root and skip the test
482 raise SkipTest("I can't create directories that I can't list")
474 with AssertPrints('is not a writable location', channel='stderr'):
483 with AssertPrints('is not a writable location', channel='stderr'):
475 ipdir = path.get_ipython_dir()
484 ipdir = path.get_ipython_dir()
476 env.pop('IPYTHON_DIR', None)
485 env.pop('IPYTHON_DIR', None)
General Comments 0
You need to be logged in to leave comments. Login now