Skip to content

Tests autodiscovery replacing hardcoded file list #13143

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

Merged
merged 4 commits into from
Jul 17, 2022

Conversation

evemorgen
Copy link
Contributor

Description

This PR hopefully resolves #8650.

The main change is the find_test_files helper function that looks for files matching the pattern in the unit tests directory. It has been used in the following test files for autodiscovery:

  • testcheck.py
  • testdeps.py
  • testfinegrained.py
  • testparse.py
  • testsemanal.py

I've also updated the readme.

Test Plan

This is a question for maintainers - does this helper function needs unit tests and if so, where should they live? I haven't found testhelpers.py 🙂

@evemorgen
Copy link
Contributor Author

evemorgen commented Jul 17, 2022

@ilevkivskyi The checks are all green, I think we're all good to merge it now 🙂

@hauntsaninja
Copy link
Collaborator

hauntsaninja commented Jul 18, 2022

Since #13138 silently broke many of our tests, I thought I'd double check this as well.

Tests for Python 3.10 on 6f93fc1 (with this PR)

========== 10142 passed, 375 skipped, 9 xfailed in 1112.76s (0:18:32) ==========

Tests for Python 3.10 on b6d525d (without this PR)

========== 10144 passed, 375 skipped, 9 xfailed in 1034.39s (0:17:14) ==========

Any idea what 2 tests we lost?

@hauntsaninja
Copy link
Collaborator

cc @evemorgen

@evemorgen
Copy link
Contributor Author

I'll look into that later today

@evemorgen
Copy link
Contributor Author

@hauntsaninja Yeah, that's right, it looks the like two tests have been lost for any reason. I'll post a PR with a fix shortly.

> diff test-310-pr.log test-310-prev.log
5272a5273,5274
>         <DataDrivenTestCase testLiteralSemanalBasicAssignment>
>         <DataDrivenTestCase testLiteralSemanalInFunction>
10311a10314
10879c10882
< ======================== 10537 tests collected in 0.46s ========================
---
> ======================== 10539 tests collected in 0.42s ========================

@evemorgen
Copy link
Contributor Author

@hauntsaninja - #13175 this PR reintroduces missing tests

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.

Auto-discovery of .test files
4 participants