Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypedDict completions: tests added #1494

Closed
wants to merge 6 commits into from

Conversation

pappasam
Copy link
Contributor

@pappasam pappasam commented Feb 7, 2020

Continues the conversation in this issue: #1478

Note: many tests are failing at present, but not the ones I've added. Notably, one of the tests for actually completing TypedDict keyword parameters that includes quotes is failing weirdly. This tells me there may be an improperly-handled edge case for key completion somewhere. @davidhalter do you have any ideas about where this could be coming from?

case = <IntegrationTestCase: /home/sroeca/src/Personal/jedi/test/completion/pep0484_typing.py:561 "d['fo']">, actual = {"'foo"}, desired = {"'foo'"}

    def assert_case_equal(case, actual, desired):
        """
        Assert ``actual == desired`` with formatted message.

        This is not needed for typical pytest use case, but as we need
        ``--assert=plain`` (see ../pytest.ini) to workaround some issue
        due to pytest magic, let's format the message by hand.
        """
>       assert actual == desired, """
    Test %r failed.
    actual  = %s
    desired = %s
    """ % (case, actual, desired)
E       AssertionError:
E         Test <IntegrationTestCase: /home/sroeca/src/Personal/jedi/test/completion/pep0484_typing.py:561 "d['fo']"> failed.
E         actual  = {"'foo"}
E         desired = {"'foo'"}
E
E       assert {"'foo"} == {"'foo'"}
E         Extra items in the left set:
E         "'foo"
E         Extra items in the right set:
E         "'foo'"
E         Use -v to get the full diff

davidhalter and others added 6 commits January 26, 2020 19:25
Given 87161df, values(from_instance=False) doesn't produce completions
anymore. Therefore, we remove from_instance as an argument.
Adds a function that takes the TypedDict as an argument.

Note: the last two tests are failing, along with lots of other tests
throughout the system.
@pappasam pappasam closed this Feb 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants