Merge pull request #6143 from blueyed/test_source
test_source: do not instantiate Source objects during collection
This commit is contained in:
commit
14eaa05b60
|
@ -127,7 +127,8 @@ def test_isparseable():
|
|||
|
||||
|
||||
class TestAccesses:
|
||||
source = Source(
|
||||
def setup_class(self):
|
||||
self.source = Source(
|
||||
"""\
|
||||
def f(x):
|
||||
pass
|
||||
|
@ -155,7 +156,8 @@ class TestAccesses:
|
|||
|
||||
|
||||
class TestSourceParsingAndCompiling:
|
||||
source = Source(
|
||||
def setup_class(self):
|
||||
self.source = Source(
|
||||
"""\
|
||||
def f(x):
|
||||
assert (x ==
|
||||
|
@ -619,7 +621,8 @@ x = 3
|
|||
|
||||
|
||||
class TestTry:
|
||||
source = """\
|
||||
def setup_class(self):
|
||||
self.source = """\
|
||||
try:
|
||||
raise ValueError
|
||||
except Something:
|
||||
|
@ -646,7 +649,8 @@ else:
|
|||
|
||||
|
||||
class TestTryFinally:
|
||||
source = """\
|
||||
def setup_class(self):
|
||||
self.source = """\
|
||||
try:
|
||||
raise ValueError
|
||||
finally:
|
||||
|
@ -663,7 +667,8 @@ finally:
|
|||
|
||||
|
||||
class TestIf:
|
||||
source = """\
|
||||
def setup_class(self):
|
||||
self.source = """\
|
||||
if 1:
|
||||
y = 3
|
||||
elif False:
|
||||
|
|
Loading…
Reference in New Issue