From 6d1662e4b7f123f55b4c8797a3878c52690c35ec Mon Sep 17 00:00:00 2001 From: Floris Bruynooghe Date: Fri, 15 Feb 2013 13:38:40 +0000 Subject: [PATCH] Use py.builtin._basestring --- _pytest/skipping.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/_pytest/skipping.py b/_pytest/skipping.py index fece24ff3..a21399873 100644 --- a/_pytest/skipping.py +++ b/_pytest/skipping.py @@ -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")