Skip to content

Commit

Permalink
Fix version comparison handling.
Browse files Browse the repository at this point in the history
Fixes Teemu#159
  • Loading branch information
Rémy HUBSCHER committed Nov 5, 2018
1 parent e8cb804 commit 2212197
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pytest_sugar.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import os
import re
import sys
from packaging.version import parse

try:
from configparser import ConfigParser
Expand Down Expand Up @@ -398,7 +399,7 @@ def pytest_runtest_logstart(self, nodeid, location):
# show the module_name & in verbose mode the test name.
pass

if pytest.__version__ >= '3.4':
if parse(pytest.__version__) >= parse('3.4'):

def pytest_runtest_logfinish(self):
# prevent the default implementation to try to show
Expand Down

0 comments on commit 2212197

Please sign in to comment.