def test_diff_command(): diff = commands.diff(test_context, ["myfile"]) assert not diff.reads_remote assert not diff.writes_remote assert diff.targets == ["myfile"] assert str(diff) == "diff myfile" diff = commands.diff(test_context, []) assert diff.targets == None assert str(diff) == "diff"
def test_diff_command(): generic_diff = commands.diff(context, []) result = dialect.convert(generic_diff) assert not result.reads_remote assert not result.writes_remote assert str(result) == "diff"
def test_diff_is_secured(): try: diff = commands.diff(secure_context, [topdir / ".." / "foo"]) assert False, "Expected exception for going above topdir" except commands.SecurityError: pass
def test_diff_command(): generic_diff = commands.diff(context, []) result = dialect.convert(generic_diff) assert str(result) == "diff"