コード例 #1
0
ファイル: test_fswrap.py プロジェクト: pombredanne/fswrap
def test_remove_folder():
    f = FS(__file__).parent
    c = f.child_folder("__test__")
    assert not c.exists
    c.make()
    assert c.exists
    c.delete()
    assert not c.exists
コード例 #2
0
ファイル: test_fswrap.py プロジェクト: pombredanne/fswrap
def test_create_folder():
    f = FS(__file__).parent
    assert f.exists
    f.make()
    assert True  # No Exceptions
    c = f.child_folder("__test__")
    assert not c.exists
    c.make()
    assert c.exists
    shutil.rmtree(unicode(c))
    assert not c.exists
コード例 #3
0
ファイル: test_fswrap.py プロジェクト: pombredanne/fswrap
def test_can_remove_file():
    f = FS(__file__).parent
    c = f.child_folder("__test__")
    c.make()
    assert c.exists
    txt = "abc"
    abc = File(c.child("abc.txt"))
    abc.write(txt)
    assert abc.exists
    abc.delete()
    assert not abc.exists
    abc.delete()
    assert True  # No Exception
    c.delete()