Пример #1
0
def test_resolved_command_no_targets():
    myfile = path(topdir) / "myfile"
    myfile.write_bytes("test data")
    try:
        generic_resolved = commands.resolved(context, [])
        resolved = hg.resolved(generic_resolved)
    finally:
        myfile.unlink()
        
    assert not resolved.reads_remote
    assert not resolved.writes_remote
    assert resolved.get_command_line() == ["hg", "resolve", "-m", "-a"]
Пример #2
0
def test_resolve_all_files(rid):
    stdout = StringIO("""A      foo.txt
C      bar.txt
A      baz.txt
""")
    rid.return_value = [0, stdout]
    generic_resolved = commands.resolved(context, [])
    result = dialect.convert(generic_resolved)
    assert result.get_command_line() == ["svn", "resolve", 
        "--accept", "working", "bar.txt"]
    assert rid.called
    
Пример #3
0
def test_resolved_command():
    resolved = commands.resolved(test_context, ["myfile"])
    assert not resolved.reads_remote
    assert not resolved.writes_remote
    assert resolved.targets == ["myfile"]
    assert str(resolved) == "resolved myfile"