Use py.builtin._basestring

This commit is contained in:
Floris Bruynooghe 2013-02-15 13:38:40 +00:00
parent 850fd2b7f7
commit 6d1662e4b7
1 changed files with 1 additions and 7 deletions

View File

@ -3,12 +3,6 @@
import py, pytest
import sys
# Provide basestring in python3
try:
basestring = basestring
except NameError:
basestring = str
def pytest_addoption(parser):
group = parser.getgroup("general")
group.addoption('--runxfail',
@ -92,7 +86,7 @@ class MarkEvaluator:
self.result = False
for expr in self.holder.args:
self.expr = expr
if isinstance(expr, basestring):
if isinstance(expr, py.builtin._basestring):
result = cached_eval(self.item.config, expr, d)
else:
pytest.fail("expression is not a string")