parent
							
								
									95de17b652
								
							
						
					
					
						commit
						d483f18374
					
				|  | @ -143,17 +143,6 @@ class TerminalReporter: | |||
|         self.write_line(infoline) | ||||
|         self.gateway2info[gateway] = infoline | ||||
| 
 | ||||
|     def pytest_gwmanage_rsyncstart(self, source, gateways): | ||||
|         targets = ", ".join(["[%s]" % gw.id for gw in gateways]) | ||||
|         msg = "rsyncstart: %s -> %s" %(source, targets) | ||||
|         if not self.config.option.verbose: | ||||
|             msg += " # use --verbose to see rsync progress" | ||||
|         self.write_line(msg) | ||||
| 
 | ||||
|     def pytest_gwmanage_rsyncfinish(self, source, gateways): | ||||
|         targets = ", ".join(["[%s]" % gw.id for gw in gateways]) | ||||
|         self.write_line("rsyncfinish: %s -> %s" %(source, targets)) | ||||
| 
 | ||||
|     def pytest_plugin_registered(self, plugin): | ||||
|         if self.config.option.traceconfig:  | ||||
|             msg = "PLUGIN registered: %s" %(plugin,) | ||||
|  |  | |||
|  | @ -100,40 +100,6 @@ class TestTerminal: | |||
|             "INTERNALERROR> *raise ValueError*" | ||||
|         ]) | ||||
| 
 | ||||
|     def test_gwmanage_events(self, testdir, linecomp): | ||||
|         execnet = py.test.importorskip("execnet") | ||||
|         modcol = testdir.getmodulecol(""" | ||||
|             def test_one(): | ||||
|                 pass | ||||
|         """, configargs=("-v",)) | ||||
| 
 | ||||
|         rep = TerminalReporter(modcol.config, file=linecomp.stringio) | ||||
|         class gw1: | ||||
|             id = "X1" | ||||
|             spec = execnet.XSpec("popen") | ||||
|         class gw2: | ||||
|             id = "X2" | ||||
|             spec = execnet.XSpec("popen") | ||||
|         class rinfo: | ||||
|             version_info = (2, 5, 1, 'final', 0) | ||||
|             executable = "hello" | ||||
|             platform = "xyz" | ||||
|             cwd = "qwe" | ||||
|          | ||||
|         rep.pytest_gwmanage_newgateway(gw1, rinfo) | ||||
|         linecomp.assert_contains_lines([ | ||||
|             "*X1*popen*xyz*2.5*" | ||||
|         ]) | ||||
| 
 | ||||
|         rep.pytest_gwmanage_rsyncstart(source="hello", gateways=[gw1, gw2]) | ||||
|         linecomp.assert_contains_lines([ | ||||
|             "rsyncstart: hello -> [X1], [X2]" | ||||
|         ]) | ||||
|         rep.pytest_gwmanage_rsyncfinish(source="hello", gateways=[gw1, gw2]) | ||||
|         linecomp.assert_contains_lines([ | ||||
|             "rsyncfinish: hello -> [X1], [X2]" | ||||
|         ]) | ||||
| 
 | ||||
|     def test_writeline(self, testdir, linecomp): | ||||
|         modcol = testdir.getmodulecol("def test_one(): pass") | ||||
|         stringio = py.io.TextIO() | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue