Example #1
0
    def test_redirect_stdout_and_stderr_with_append(self):

        s = Sultan()
        r = Redirect(s, '')
        r("/tmp/foo", stdout=True, stderr=True, append=True)
        self.assertEqual(r.command, "&>> /tmp/foo")
Example #2
0
    def test_redirect_stderr_only(self):

        s = Sultan()
        r = Redirect(s, '')
        r("/tmp/foo", stderr=True)
        self.assertEqual(r.command, "2> /tmp/foo")