73
74
bzrlib.tests.default_transport = old_transport
74
75
TestOptions.current_test = None
75
76
TestCaseInTempDir.TEST_ROOT = old_root
79
class TestRunBzr(ExternalBase):
81
def run_bzr_captured(self, argv, retcode=0, stdin=None):
85
# test that the stdin keyword to run_bzr is passed through to
86
# run_bzr_captured as-is.
87
self.run_bzr('foo', 'bar', stdin='gam')
88
self.assertEqual('gam', self.stdin)
89
self.run_bzr('foo', 'bar', stdin='zippy')
90
self.assertEqual('zippy', self.stdin)
93
class TestRunBzrCaptured(ExternalBase):
95
def apply_redirected(self, stdin=None, stdout=None, stderr=None,
96
a_callable=None, *args, **kwargs):
100
def test_stdin(self):
101
# test that the stdin keyword to run_bzr_captured is passed through to
102
# apply_redirected as a StringIO
103
self.run_bzr_captured(['foo', 'bar'], stdin='gam')
104
self.assertEqual('gam', self.stdin.read())
105
self.run_bzr_captured(['foo', 'bar'], stdin='zippy')
106
self.assertEqual('zippy', self.stdin.read())