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

Make version test use regex #242

Merged
merged 1 commit into from May 23, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 3 additions & 2 deletions tests/test_flake8_comprehensions.py
@@ -1,3 +1,4 @@
import re
import sys

import pytest
Expand All @@ -13,9 +14,9 @@

def test_version(flake8dir):
result = flake8dir.run_flake8(["--version"])
version_string = "flake8-comprehensions: " + version("flake8-comprehensions")
version_regex = r"flake8-comprehensions:( )*" + version("flake8-comprehensions")
unwrapped = "".join(result.out_lines)
assert version_string in unwrapped
assert re.search(version_regex, unwrapped)


# C400
Expand Down