Skip to content

Fix tests for 3.10rc1 and up#872

Merged
JelleZijlstra merged 1 commit intopython:masterfrom
Fidget-Spinner:fix_3.10rc1_3.11_tests
Aug 30, 2021
Merged

Fix tests for 3.10rc1 and up#872
JelleZijlstra merged 1 commit intopython:masterfrom
Fidget-Spinner:fix_3.10rc1_3.11_tests

Conversation

@Fidget-Spinner
Copy link
Copy Markdown
Member

@Fidget-Spinner Fidget-Spinner commented Aug 30, 2021

Before:

======================================================================
FAIL: test_get_type_hints_modules (__main__.GetTypeHintTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "...\typing_extensions\src_py3\test_typing_extensions.py", line 473, in test_get_type_hints_modules
    self.assertEqual(gth(ann_module), ann_module_type_hints)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: {1: 2, 'x': <class 'int'>, 'y': <class 'str'>, 'f[39 chars]loat} != {1: 2, 'f': typing.Tuple[int, int], 'x': <class '[21 chars]tr'>}
+ {1: 2, 'f': typing.Tuple[int, int], 'x': <class 'int'>, 'y': <class 'str'>}
- {1: 2,
-  'f': typing.Tuple[int, int],
-  'u': int | float,
-  'x': <class 'int'>,
-  'y': <class 'str'>}

Because ann_module added a new annotation for union tests in 3.10rc1.

@Fidget-Spinner
Copy link
Copy Markdown
Member Author

@JelleZijlstra in case you were testing locally on 3.10rc1 and wondering why some tests were failing.

This isn't required for release, so we can commit it after 3.10.0.2 is out.

@JelleZijlstra
Copy link
Copy Markdown
Member

Thanks! I'm still running tox locally but it doesn't seem to have gotten past 3.5 yet so I may have to rethink my testing strategy. I will land this so that 3.10 tests pass on the new release.

@JelleZijlstra JelleZijlstra merged commit 58de2e9 into python:master Aug 30, 2021
@Fidget-Spinner Fidget-Spinner deleted the fix_3.10rc1_3.11_tests branch August 30, 2021 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants