コード例 #1
0
def test_ssh_branch():
    name, url, branch, is_url = P(
        '[email protected]:leanprover-community/tutorials.git:foo')
    assert name == 'tutorials'
    assert url == '[email protected]:leanprover-community/tutorials.git'
    assert branch == 'foo'
    assert is_url
コード例 #2
0
def test_https_branch():
    name, url, branch, is_url = P(
        'https://github.com/leanprover-community/tutorials.git:foo')
    assert name == 'tutorials'
    assert url == 'https://github.com/leanprover-community/tutorials.git'
    assert branch == 'foo'
    assert is_url
コード例 #3
0
def test_name():
    name, url, branch, is_url = P('tutorials')
    assert name == 'tutorials'
    assert url == '[email protected]:leanprover-community/tutorials.git'
    assert branch == ''
    assert not is_url
コード例 #4
0
def test_org_name_branch():
    name, url, branch = P('leanprover-community/tutorials:foo')
    assert name == 'tutorials'
    assert url == '[email protected]:leanprover-community/tutorials.git'
    assert branch == 'foo'
コード例 #5
0
def test_ssh():
    name, url, branch = P('[email protected]:leanprover-community/tutorials.git')
    assert name == 'tutorials'
    assert url == '[email protected]:leanprover-community/tutorials.git'
    assert branch == ''
コード例 #6
0
def test_https():
    name, url, branch = P('https://github.com/leanprover-community/tutorials.git')
    assert name == 'tutorials'
    assert url == 'https://github.com/leanprover-community/tutorials.git'
    assert branch == ''