Skip to content

test_keys fails with prompt-toolkit 1.0.1 #125

@donnemartin

Description

@donnemartin

feed_key was separated to feed and process_keys. For more details, check out:

prompt-toolkit/python-prompt-toolkit#321

======================================= FAILURES =======================================
__________________________________ KeysTest.test_F10 ___________________________________

self = <tests.integration.test_keys.KeysTest testMethod=test_F10>

    def test_F10(self):
        self.processor.feed(KeyPress(Keys.F10, ''))
>       assert self.aws_shell.cli.is_exiting
E       AssertionError: assert <prompt_toolkit.interface.CommandLineInterface object at 0x106ec4c50>.is_exiting
E        +  where <prompt_toolkit.interface.CommandLineInterface object at 0x106ec4c50> = <awsshell.app.AWSShell object at 0x106e37390>.cli
E        +    where <awsshell.app.AWSShell object at 0x106e37390> = <tests.integration.test_keys.KeysTest testMethod=test_F10>.aws_shell

tests/integration/test_keys.py:56: AssertionError
___________________________________ KeysTest.test_F2 ___________________________________

self = <tests.integration.test_keys.KeysTest testMethod=test_F2>

    def test_F2(self):
        match_fuzzy = self.aws_shell.model_completer.match_fuzzy
        self.processor.feed(KeyPress(Keys.F2, ''))
>       assert match_fuzzy != self.aws_shell.model_completer.match_fuzzy
E       AssertionError: assert True != True
E        +  where True = <Mock id='4411315984'>.match_fuzzy
E        +    where <Mock id='4411315984'> = <awsshell.app.AWSShell object at 0x106ef5748>.model_completer
E        +      where <awsshell.app.AWSShell object at 0x106ef5748> = <tests.integration.test_keys.KeysTest testMethod=test_F2>.aws_shell

tests/integration/test_keys.py:33: AssertionError
___________________________________ KeysTest.test_F3 ___________________________________

self = <tests.integration.test_keys.KeysTest testMethod=test_F3>

    def test_F3(self):
        enable_vi_bindings = self.aws_shell.enable_vi_bindings
        with self.assertRaises(InputInterrupt):
            self.processor.feed(KeyPress(Keys.F3, ''))
>           assert enable_vi_bindings != self.aws_shell.enable_vi_bindings
E           AssertionError: assert True != True
E            +  where True = <awsshell.app.AWSShell object at 0x106f82e10>.enable_vi_bindings
E            +    where <awsshell.app.AWSShell object at 0x106f82e10> = <tests.integration.test_keys.KeysTest testMethod=test_F3>.aws_shell

tests/integration/test_keys.py:39: AssertionError
___________________________________ KeysTest.test_F4 ___________________________________

self = <tests.integration.test_keys.KeysTest testMethod=test_F4>

    def test_F4(self):
        show_completion_columns = self.aws_shell.show_completion_columns
        with self.assertRaises(InputInterrupt):
            self.processor.feed(KeyPress(Keys.F4, ''))
>           assert show_completion_columns != \
                self.aws_shell.show_completion_columns
E           AssertionError: assert True != True
E            +  where True = <awsshell.app.AWSShell object at 0x107836160>.show_completion_columns
E            +    where <awsshell.app.AWSShell object at 0x107836160> = <tests.integration.test_keys.KeysTest testMethod=test_F4>.aws_shell

tests/integration/test_keys.py:45: AssertionError
___________________________________ KeysTest.test_F5 ___________________________________

self = <tests.integration.test_keys.KeysTest testMethod=test_F5>

    def test_F5(self):
        show_help = self.aws_shell.show_help
        with self.assertRaises(InputInterrupt):
            self.processor.feed(KeyPress(Keys.F5, ''))
>           assert show_help != self.aws_shell.show_help
E           AssertionError: assert True != True
E            +  where True = <awsshell.app.AWSShell object at 0x1078acb00>.show_help
E            +    where <awsshell.app.AWSShell object at 0x1078acb00> = <tests.integration.test_keys.KeysTest testMethod=test_F5>.aws_shell

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions