Esempio n. 1
0
    def test_print_handles_numbers(self):
        with mock_stdout_fd() as stdout:
            self.eval(u'(print! 1)')

        self.assertEqual(stdout.call_args[0][1], "1\n")
Esempio n. 2
0
    def test_print_writes_to_stdout(self):
        with mock_stdout_fd() as stdout:
            self.eval(u'(print! "foo")')

        self.assertEqual(stdout.call_args[0][1], "foo\n")