예제 #1
0
파일: tests.py 프로젝트: ddbeck/oraide
    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()
예제 #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()
예제 #3
0
파일: tests.py 프로젝트: ddbeck/oraide
    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()
예제 #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()
예제 #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)
예제 #6
0
 def test_no_server_raises_connection_failed_error(self):
     with self.assertRaises(ConnectionFailedError):
         send_keys(self.session_name, self.verification_string)
예제 #7
0
파일: simple.py 프로젝트: movermeyer/oraide
def main():
    oraide.send_keys('oraide-example', "echo 'Hello, world!'")
    oraide.send_keys('oraide-example', oraide.keyboard.enter, literal=False)
예제 #8
0
파일: tests.py 프로젝트: ddbeck/oraide
    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)
예제 #9
0
파일: tests.py 프로젝트: ddbeck/oraide
 def test_no_server_raises_connection_failed_error(self):
     with self.assertRaises(ConnectionFailedError):
         send_keys(self.session_name, self.verification_string)