streamline some tests and overall reduce py.test.ensuretemp usage, note down issue about deprecation .

--HG--
branch : trunk
This commit is contained in:
holger krekel
2009-12-29 22:26:03 +01:00
parent 9be7d78fb1
commit 77b640d1b7
13 changed files with 92 additions and 153 deletions

View File

@@ -310,10 +310,9 @@ def test_deindent():
assert lines == ['', 'def f():', ' def g():', ' pass', ' ']
@py.test.mark.xfail
def test_source_of_class_at_eof_without_newline():
def test_source_of_class_at_eof_without_newline(tmpdir):
# this test fails because the implicit inspect.getsource(A) below
# does not return the "x = 1" last line.
tmpdir = py.test.ensuretemp("source_write_read")
source = py.code.Source('''
class A(object):
def method(self):