Example #1
0
    def test_literal_keys_appear_in_session(self):
        self.start_tmux_session()
        send_keys(self.session_name, '\n' + self.verification_string)

        @assert_after_timeout
        def _assertion():
            self.assertIn(self.verification_string,
                          self.get_tmux_session_contents())
        _assertion()
Example #2
0
    def test_literal_keys_appear_in_session(self):
        self.start_tmux_session()
        send_keys(self.session_name, '\n' + self.verification_string)

        @assert_after_timeout
        def _assertion():
            self.assertIn(self.verification_string,
                          self.get_tmux_session_contents())

        _assertion()
Example #3
0
    def test_lookup_keys_are_sent_to_session(self):
        self.start_tmux_session()
        send_keys(self.session_name,
                  'echo "Hello, {}"'.format(self.verification_string))
        send_keys(self.session_name, 'Enter', literal=False)

        @assert_after_timeout
        def _assertion():
            session_contents = self.get_tmux_session_contents()
            self.assertEqual(2,
                             session_contents.count(self.verification_string))
        _assertion()
Example #4
0
    def test_lookup_keys_are_sent_to_session(self):
        self.start_tmux_session()
        send_keys(self.session_name,
                  'echo "Hello, {}"'.format(self.verification_string))
        send_keys(self.session_name, 'Enter', literal=False)

        @assert_after_timeout
        def _assertion():
            session_contents = self.get_tmux_session_contents()
            self.assertEqual(2,
                             session_contents.count(self.verification_string))

        _assertion()
Example #5
0
    def test_wrong_session_raises_session_not_found_error(self):
        self.start_tmux_session()

        with self.assertRaises(SessionNotFoundError):
            send_keys(self.session_name + '__', self.verification_string)
Example #6
0
 def test_no_server_raises_connection_failed_error(self):
     with self.assertRaises(ConnectionFailedError):
         send_keys(self.session_name, self.verification_string)
Example #7
0
def main():
    oraide.send_keys('oraide-example', "echo 'Hello, world!'")
    oraide.send_keys('oraide-example', oraide.keyboard.enter, literal=False)
Example #8
0
    def test_wrong_session_raises_session_not_found_error(self):
        self.start_tmux_session()

        with self.assertRaises(SessionNotFoundError):
            send_keys(self.session_name + '__', self.verification_string)
Example #9
0
 def test_no_server_raises_connection_failed_error(self):
     with self.assertRaises(ConnectionFailedError):
         send_keys(self.session_name, self.verification_string)