コード例 #1
0
ファイル: test_terminal.py プロジェクト: bubenkoff/pytest
 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
ファイル: test_terminal.py プロジェクト: zooba/pytest
 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
ファイル: test_terminal.py プロジェクト: ProProgrammer/pytest
 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"