48:9b37d0f08f1c
Anton Shestakov <av6@dwimlabs.net>, Sun, 19 Jun 2016 22:04:57 +0800
incoming: save filename and line number for linter output in Check.lines

next change 50:8194291e98bc
previous change 45:d120981c4310

tests/test_incoming.py

Permissions: -rw-r--r--

Other formats: Feeds:
from incoming import parse_project_url
def test_parse_project_url():
result = parse_project_url('https://example.com/alice/hello-world')
assert result == ('example.com', 'alice', 'hello-world')
result = parse_project_url('~alice/hello-world')
assert result == ('self', '~alice', 'hello-world')
result = parse_project_url('https://code.example.com/hello-world')
assert result == ('code.example.com', None, 'hello-world')
result = parse_project_url('https://example.com/scm/projects/hello-world')
assert result == ('example.com', 'scm', 'projects/hello-world')
result = parse_project_url('https://example.com///hello-world//')
assert result == ('example.com', None, 'hello-world')