(self)
| 639 | assert mc.run("iterable").stdout == "tock" |
| 640 | |
| 641 | def consumes_singleton_results_when_repeat_False(self): |
| 642 | mc = MockContext( |
| 643 | repeat=False, |
| 644 | run=dict( |
| 645 | singleton=True, |
| 646 | wassup=Result("yo"), |
| 647 | iterable=[Result("tick"), Result("tock")], |
| 648 | ), |
| 649 | ) |
| 650 | assert mc.run("singleton").ok |
| 651 | with raises(NotImplementedError): # was consumed |
| 652 | mc.run("singleton") |
| 653 | assert mc.run("wassup").ok |
| 654 | with raises(NotImplementedError): # was consumed |
| 655 | mc.run("wassup") |
| 656 | assert mc.run("iterable").stdout == "tick" |
| 657 | assert mc.run("iterable").stdout == "tock" |
| 658 | with raises(NotImplementedError): # was consumed |
| 659 | assert mc.run("iterable") |
| 660 | |
| 661 | def sudo_also_covered(self): |
| 662 | c = MockContext(sudo=Result(stderr="super duper")) |
nothing calls this directly
no test coverage detected