Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add back an invalid url to the invalid_urls() fixture #18

Merged
merged 1 commit into from
Nov 3, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions test/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,5 +262,5 @@ def git_urls():


@pytest.fixture()
def invalid_urls():
return []
def invalid_strings():
return ['', 'not a valid URL']
6 changes: 3 additions & 3 deletions test/test_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ def test_parse(git_urls):
assert d['owner'] == result.owner


def test_parse_raises_on_invalid_url(invalid_urls):
for url in invalid_urls:
p = parser.Parser(url)
def test_parse_raises_on_invalid_string(invalid_strings):
for invalid_string in invalid_strings:
p = parser.Parser(invalid_string)
with pytest.raises(parser.ParserError):
p.parse()

Expand Down