Пример #1
0
def test_parse_editable_local(isdir_mock, exists_mock, getcwd_mock, normcase_mock):
    exists_mock.return_value = isdir_mock.return_value = True
    # mocks needed to support path operations on windows tests
    normcase_mock.return_value = getcwd_mock.return_value = "/some/path"
    assert parse_editable(".", "git") == (None, "file:///some/path", None)
    normcase_mock.return_value = "/some/path/foo"
    assert parse_editable("foo", "git") == (None, "file:///some/path/foo", None)
Пример #2
0
def test_parse_editable_local(isdir_mock, exists_mock, getcwd_mock,
                              normcase_mock):
    exists_mock.return_value = isdir_mock.return_value = True
    # mocks needed to support path operations on windows tests
    normcase_mock.return_value = getcwd_mock.return_value = "/some/path"
    assert parse_editable('.', 'git') == (None, 'file:///some/path', None)
    normcase_mock.return_value = "/some/path/foo"
    assert parse_editable('foo',
                          'git') == (None, 'file:///some/path/foo', None)
Пример #3
0
def test_parse_editable_local_extras(isdir_mock, exists_mock, getcwd_mock,
                                     normcase_mock):
    exists_mock.return_value = isdir_mock.return_value = True
    normcase_mock.return_value = getcwd_mock.return_value = "/some/path"
    assert_equal(parse_editable('.[extras]', 'git'),
                 (None, 'file://' + "/some/path", ('extras', )))
    normcase_mock.return_value = "/some/path/foo"
    assert_equal(parse_editable('foo[bar,baz]', 'git'),
                 (None, 'file:///some/path/foo', ('bar', 'baz')))
Пример #4
0
def test_parse_editable_local_extras(isdir_mock, exists_mock, getcwd_mock, normcase_mock):
    exists_mock.return_value = isdir_mock.return_value = True
    normcase_mock.return_value = getcwd_mock.return_value = "/some/path"
    assert_equal(
        parse_editable('.[extras]', 'git'),
        (None, 'file://' + "/some/path", ('extras',))
    )
    normcase_mock.return_value = "/some/path/foo"
    assert_equal(
        parse_editable('foo[bar,baz]', 'git'),
        (None, 'file:///some/path/foo', ('bar', 'baz'))
    )
Пример #5
0
def test_parse_editable_local(isdir_mock, exists_mock, getcwd_mock, normcase_mock):
    exists_mock.return_value = isdir_mock.return_value = True
    # mocks needed to support path operations on windows tests
    normcase_mock.return_value = getcwd_mock.return_value = "/some/path"
    assert_equal(
        parse_editable('.', 'git'),
        (None, 'file:///some/path', None)
    )
    normcase_mock.return_value = "/some/path/foo"
    assert_equal(
        parse_editable('foo', 'git'),
        (None, 'file:///some/path/foo', None)
    )
Пример #6
0
def test_parse_editable_vcs_extras():
    assert_equal(
        parse_editable('svn+https://foo#egg=foo[extras]', 'git'),
        ('foo[extras]', 'svn+https://foo#egg=foo[extras]', None)
    )
Пример #7
0
def test_parse_editable_explicit_vcs():
    assert_equal(
        parse_editable('svn+https://foo#egg=foo', 'git'),
        ('foo', 'svn+https://foo#egg=foo', None)
    )
Пример #8
0
def test_parse_editable_default_vcs():
    assert_equal(
        parse_editable('https://foo#egg=foo', 'git'),
        ('foo', 'git+https://foo#egg=foo', None)
    )
Пример #9
0
def test_parse_editable_local_extras(isdir_mock, exists_mock, getcwd_mock, normcase_mock):
    exists_mock.return_value = isdir_mock.return_value = True
    normcase_mock.return_value = getcwd_mock.return_value = "/some/path"
    assert parse_editable(".[extras]", "git") == (None, "file://" + "/some/path", ("extras",))
    normcase_mock.return_value = "/some/path/foo"
    assert parse_editable("foo[bar,baz]", "git") == (None, "file:///some/path/foo", ("bar", "baz"))
Пример #10
0
def test_parse_editable_vcs_extras():
    assert parse_editable("svn+https://foo#egg=foo[extras]", "git") == (
        "foo[extras]",
        "svn+https://foo#egg=foo[extras]",
        {"egg": "foo[extras]"},
    )
Пример #11
0
def test_parse_editable_explicit_vcs():
    assert parse_editable("svn+https://foo#egg=foo", "git") == ("foo", "svn+https://foo#egg=foo", {"egg": "foo"})
Пример #12
0
def test_parse_editable_default_vcs():
    assert parse_editable("https://foo#egg=foo", "git") == ("foo", "git+https://foo#egg=foo", {"egg": "foo"})
Пример #13
0
def test_parse_editable_vcs_extras():
    assert parse_editable('svn+https://foo#egg=foo[extras]',
                          'git') == ('foo[extras]',
                                     'svn+https://foo#egg=foo[extras]', {
                                         'egg': 'foo[extras]'
                                     })
Пример #14
0
def test_parse_editable_explicit_vcs():
    assert parse_editable('svn+https://foo#egg=foo',
                          'git') == ('foo', 'svn+https://foo#egg=foo', {
                              'egg': 'foo'
                          })
Пример #15
0
def test_parse_editable_default_vcs():
    assert parse_editable('https://foo#egg=foo',
                          'git') == ('foo', 'git+https://foo#egg=foo', {
                              'egg': 'foo'
                          })