'tests handling of example repl'

def test_handle_examples(self):

    temp_function = self.shell.example_repl
    self.shell.example_repl = mock_pass
    text = 'guess    ::    h'
    c_flag = False
    self.shell.handle_example(text, c_flag)
    self.assertEqual(self.out_stream.getvalue(), 'An    Integer    should    follow    the    colon\n')
    self.out_stream.truncate(0)
    self.out_stream.seek(0)
    text = 'guess    ::    2.8'
    c_flag = False
    self.shell.handle_example(text, c_flag)
    self.assertEqual(self.out_stream.getvalue(), 'An    Integer    should    follow    the    colon\n')
    self.out_stream.truncate(0)
    self.out_stream.seek(0)
    text = 'guess    ::    -3'
    c_flag = False
    self.shell.handle_example(text, c_flag)
    self.assertEqual(self.out_stream.getvalue(), 'Invalid    example    number\n')
    self.out_stream.truncate(0)
    self.out_stream.seek(0)
    text = 'guess    ::    3'
    c_flag = False
    self.shell.handle_example(text, c_flag)
    self.assertEqual(self.out_stream.getvalue(), 'Invalid    example    number\n')
    self.out_stream.truncate(0)
    self.out_stream.seek(0)
    text = 'guess    ::    1'
    c_flag = False
    self.shell.handle_example(text, c_flag)
    self.shell.example_repl = temp_function
