예제 #1
0
def test_qisrc_remove_exsiting(qisrc_action):
    worktree = qisrc_action.worktree
    worktree.create_project("foo")
    qisrc_action("remove", "foo")
    worktree = TestWorkTree()
    assert not worktree.get_project("foo")
    assert worktree.tmpdir.join("foo").check(dir=True)
예제 #2
0
def test_qisrc_remove_exsiting(qisrc_action):
    worktree = qisrc_action.worktree
    worktree.create_project("foo")
    qisrc_action("remove", "foo")
    worktree = TestWorkTree()
    assert not worktree.get_project("foo")
    assert worktree.tmpdir.join("foo").check(dir=True)
예제 #3
0
def test_with_git(qisrc_action):
    qisrc_action("create", "foo", "--git")
    worktree = TestWorkTree()
    foo_proj = worktree.get_project("foo")
    git = qisrc.git.Git(foo_proj.path)
    ret, out = git.call("show", "HEAD", raises=False)
    assert ret == 0
    assert ".gitignore" in out
예제 #4
0
def test_qisrc_remove_existing_from_disk(qisrc_action):
    """ Test QiSrc Remove Existing From Disk """
    worktree = qisrc_action.worktree
    worktree.create_project("foo")
    qisrc_action("remove", "foo", "--from-disk")
    worktree = TestWorkTree()
    assert not worktree.get_project("foo")
    assert not worktree.tmpdir.join("foo").check(dir=True)
예제 #5
0
def test_with_git(qisrc_action):
    qisrc_action("create", "foo", "--git")
    worktree = TestWorkTree()
    foo_proj = worktree.get_project("foo")
    git = qisrc.git.Git(foo_proj.path)
    ret, out = git.call("show", "HEAD", raises=False)
    assert ret == 0
    assert ".gitignore" in out
예제 #6
0
def test_get_set_license(worktree):
    foo = worktree.create_project("foo")
    assert foo.license is None
    foo.license = "GPL"
    assert foo.license == "GPL"
    worktree2 = TestWorkTree()
    foo2 = worktree2.get_project("foo")
    assert foo2.license == "GPL"
예제 #7
0
def test_qisrc_remove_existing_from_disk(qisrc_action):
    """ Test QiSrc Remove Existing From Disk """
    worktree = qisrc_action.worktree
    worktree.create_project("foo")
    qisrc_action("remove", "foo", "--from-disk")
    worktree = TestWorkTree()
    assert not worktree.get_project("foo")
    assert not worktree.tmpdir.join("foo").check(dir=True)
예제 #8
0
def test_get_set_license(worktree):
    foo = worktree.create_project("foo")
    assert foo.license is None
    foo.license = "GPL"
    assert foo.license == "GPL"
    worktree2 = TestWorkTree()
    foo2 = worktree2.get_project("foo")
    assert foo2.license == "GPL"
예제 #9
0
def test_get_set_license(worktree):
    """ Test Get Set Licence """
    food = worktree.create_project("foo")
    assert food.license is None
    food.license = "GPL"
    assert food.license == "GPL"
    worktree2 = TestWorkTree()
    foo2 = worktree2.get_project("foo")
    assert foo2.license == "GPL"