Exemple #1
0
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
Exemple #2
0
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
Exemple #3
0
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()