All classes now subclass object for better py3 compatibility

Fix #2147
This commit is contained in:
Bruno Oliveira
2018-01-24 18:23:42 -02:00
parent 3b3d237f07
commit af37778b0d
22 changed files with 56 additions and 55 deletions

View File

@@ -880,10 +880,10 @@ class TestConftestCustomization(object):
import sys, os, imp
from _pytest.python import Module
class Loader:
class Loader(object):
def load_module(self, name):
return imp.load_source(name, name + ".narf")
class Finder:
class Finder(object):
def find_module(self, name, path=None):
if os.path.exists(name + ".narf"):
return Loader()

View File

@@ -2828,7 +2828,7 @@ class TestShowFixtures(object):
def test_show_fixtures_indented_in_class(self, testdir):
p = testdir.makepyfile(dedent('''
import pytest
class TestClass:
class TestClass(object):
@pytest.fixture
def fixture1(self):
"""line1

View File

@@ -241,7 +241,7 @@ class TestMetafunc(object):
"""
from _pytest.python import _idval
class TestClass:
class TestClass(object):
pass
def test_function():