예제 #1
0
 def test_writeline(self, testdir, linecomp):
     modcol = testdir.getmodulecol("def test_one(): pass")
     rep = TerminalReporter(modcol.config, file=linecomp.stringio)
     rep.write_fspath_result(modcol.nodeid, ".")
     rep.write_line("hello world")
     lines = linecomp.stringio.getvalue().split('\n')
     assert not lines[0]
     assert lines[1].endswith(modcol.name + " .")
     assert lines[2] == "hello world"
예제 #2
0
 def test_writeline(self, testdir, linecomp):
     modcol = testdir.getmodulecol("def test_one(): pass")
     rep = TerminalReporter(modcol.config, file=linecomp.stringio)
     rep.write_fspath_result(modcol.nodeid, ".")
     rep.write_line("hello world")
     lines = linecomp.stringio.getvalue().split('\n')
     assert not lines[0]
     assert lines[1].endswith(modcol.name + " .")
     assert lines[2] == "hello world"
예제 #3
0
 def test_writeline(self, testdir, linecomp):
     modcol = testdir.getmodulecol("def test_one(): pass")
     stringio = py.io.TextIO()
     rep = TerminalReporter(modcol.config, file=linecomp.stringio)
     rep.write_fspath_result(py.path.local("xy.py"), '.')
     rep.write_line("hello world")
     lines = linecomp.stringio.getvalue().split('\n')
     assert not lines[0]
     assert lines[1].endswith("xy.py .")
     assert lines[2] == "hello world"
예제 #4
0
 def test_writeline(self, testdir, linecomp):
     modcol = testdir.getmodulecol("def test_one(): pass")
     stringio = py.io.TextIO()
     rep = TerminalReporter(modcol.config, file=linecomp.stringio)
     rep.write_fspath_result(py.path.local("xy.py"), '.')
     rep.write_line("hello world")
     lines = linecomp.stringio.getvalue().split('\n')
     assert not lines[0]
     assert lines[1].endswith("xy.py .")
     assert lines[2] == "hello world"