예제 #1
0
def test_init():
    rename = Rename.init_from_args("--file tests/argfiles/rename.txt")
    assert rename.remove == False

    rename = Rename.init_from_args(
        "--file tests/argfiles/rename.txt --remove-missing")
    assert rename.remove == True
예제 #2
0
def test_init(argfilepath):
    rename = Rename.init_from_args("--file {0} --from old --to new".format(argfilepath("rename.txt")))
    assert rename.opts.remove == False

    rename = Rename.init_from_args("--file {0} --from old --to new --remove-missing".format(argfilepath("rename.txt")))
    assert rename.opts.remove == True