예제 #1
0
def test_rmdir_twice_should_fail():
    d = filepath()
    os.mkdir(d)
    os.rmdir(d)
    assert_raises(OSError, os.rmdir, d)
예제 #2
0
def test_rmdir_should_only_remove_empty_dirs():
    d = filepath()
    os.mkdir(d)
    os.mkdir(filepath(d, "1"))
    assert_raises(OSError, os.rmdir, d)
예제 #3
0
def test_rmdir():
    d = filepath()
    os.mkdir(d)
    os.rmdir(d)
    assert_false(os.path.exists(d), "exists(%s)" % d)
예제 #4
0
def test_mkdir_should_work_recursively():
    d = filepath()
    os.mkdir(d)
    os.mkdir(filepath(d, "1"))
    assert_equals(os.listdir(d), ["1"])
예제 #5
0
def test_mkdir_should_create_empty_directory():
    d = filepath()
    os.mkdir(d)
    assert_equals(os.listdir(d), [])
예제 #6
0
def test_mkdir():
    d = filepath()
    os.mkdir(d)
    assert_true(os.path.isdir(d), u"¬ isdir(%s)" % d)