Skip to content

Commit

Permalink
Make version test use regex (#242)
Browse files Browse the repository at this point in the history
  • Loading branch information
adamchainz committed May 23, 2020
1 parent bb3902c commit acb34ce
Showing 1 changed file with 3 additions and 2 deletions.
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

0 comments on commit acb34ce

Please sign in to comment.