Skip to content

Conversation

@JohnVillalovos
Copy link
Member

@JohnVillalovos JohnVillalovos commented Nov 24, 2021

Before we were generating 725 tests for the
meta/test_ensure_type_hints.py tests. Which isn't a huge concern as
it was fairly fast. But when we had a failure we would usually get two
failures for each problem as the same test was being run multiple
times.

Changed it so that:

  1. Don't add tests that are not for *Manager classes
  2. Use a set so that we don't have duplicate tests.

After doing that our generated test count in
meta/test_ensure_type_hints.py went from 725 to 178 tests.

Additionally removed the parsing of pyproject.toml to generate files
to ignore as we have finished adding type-hints to all files in
gitlab/v4/objects/. This also means we no longer use the toml library
so remove installation of types-toml.

To determine the test count the following command was run:
$ tox -e py39 -- -k test_ensure_type_hints

Copy link
Member

@nejch nejch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't even realize before! Just a small note from me.

Before we were generating 725 tests for the
meta/test_ensure_type_hints.py tests.  Which isn't a huge concern as
it was fairly fast. But when we had a failure we would usually get two
failures for each problem as the same test was being run multiple
times.

Changed it so that:
  1. Don't add tests that are not for *Manager classes
  2. Use a set so that we don't have duplicate tests.

After doing that our generated test count in
meta/test_ensure_type_hints.py went from 725 to 178 tests.

Additionally removed the parsing of `pyproject.toml` to generate files
to ignore as we have finished adding type-hints to all files in
gitlab/v4/objects/. This also means we no longer use the toml library
so remove installation of `types-toml`.

To determine the test count the following command was run:
  $ tox -e py39 -- -k test_ensure_type_hints
@JohnVillalovos JohnVillalovos force-pushed the jlvillal/reduce_meta_tests branch from a2e838f to a2f59f4 Compare November 24, 2021 20:50
@nejch nejch enabled auto-merge November 24, 2021 20:58
@nejch nejch merged commit 3225f2c into main Nov 24, 2021
@nejch nejch deleted the jlvillal/reduce_meta_tests branch November 24, 2021 21:00
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.

3 participants