Esempio n. 1
0
 def mainsession(self, *args): 
     from py.__.test.terminal.terminal import TerminalSession
     self.file = py.std.StringIO.StringIO() 
     config = py.test.config._reparse(list(args))
     session = TerminalSession(config, file=self.file) 
     session.main()
     return session
Esempio n. 2
0
 def test_select_interplevel(self): 
     config = py.test.config._reparse([innertest, '-k', 'interplevel'])
     session = TerminalSession(config, py.std.sys.stdout)
     session.main()
     l = session.getitemoutcomepairs(Passed)
     assert len(l) == 2 
     for item in l:
         assert item[0].name in ('test_something', 'test_method')
     #item = l[0][0]
     #assert item.name == 'test_one'
     l = session.getitemoutcomepairs(Skipped)
     assert len(l) == 2 
     for item in l:
         assert item[0].name in ('app_test_something', 'test_method_app')
Esempio n. 3
0
 def test_select_interplevel(self):
     config = py.test.config._reparse([innertest, '-k', 'interplevel'])
     session = TerminalSession(config, py.std.sys.stdout)
     session.main()
     l = session.getitemoutcomepairs(Passed)
     assert len(l) == 2
     for item in l:
         assert item[0].name in ('test_something', 'test_method')
     #item = l[0][0]
     #assert item.name == 'test_one'
     l = session.getitemoutcomepairs(Skipped)
     assert len(l) == 2
     for item in l:
         assert item[0].name in ('app_test_something', 'test_method_app')