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

Hide pytest from code snippets #8198

Merged
merged 4 commits into from Sep 26, 2023
Merged

Conversation

crusaderky
Copy link
Collaborator

@crusaderky crusaderky commented Sep 20, 2023

Clean up code snippets when pytest starts a cluster, e.g. coiled/benchmarks:

image

@crusaderky crusaderky self-assigned this Sep 20, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Sep 20, 2023

Unit Test Results

See test report for an extended history of previous test failures. This is useful for diagnosing flaky tests.

       19 files   -        2         19 suites   - 2   8h 55m 1s ⏱️ - 1h 30m 48s
  3 815 tests +       1    3 702 ✔️  -        1     107 💤 ±    0    6 +2 
33 902 runs   - 2 951  32 217 ✔️  - 2 826  1 675 💤  - 129  10 +4 

For more details on these failures, see this check.

Results for commit ec9aa85. ± Comparison against base commit b6333df.

♻️ This comment has been updated with latest results.

Copy link
Member

@jrbourbeau jrbourbeau left a comment

Choose a reason for hiding this comment

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

Thanks @crusaderky. This seems reasonable to me, though the distributed/tests/test_client.py::test_computation_object_code_dask_compute failure looks legitimate

@@ -274,6 +274,7 @@ distributed:
max-history: 100
nframes: 0
ignore-modules:
- _pytest
Copy link
Member

Choose a reason for hiding this comment

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

Just for my own understanding, why _pytest and not pytest?

Copy link
Member

Choose a reason for hiding this comment

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

https://github.com/pytest-dev/pytest/blob/main/src/pytest/__init__.py doesn't have any function defs and so won't appear in any frames

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

TIL 🙂

@crusaderky crusaderky marked this pull request as draft September 20, 2023 20:13
@crusaderky crusaderky marked this pull request as ready for review September 21, 2023 17:40
@crusaderky
Copy link
Collaborator Author

It turns out it was quite a bit more involved than the original one-liner. It's ready for review again.

- py\.test # `py.test` shell command
- pytest-script\.py # `pytest` shell command in Windows
- _pytest # pytest implementation
- pycharm # Run pytest from PyCharm GUI
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Could someone with vscode please run test_client.py and see if there are any regressions in the code tests?

@fjetter
Copy link
Member

fjetter commented Sep 26, 2023

I verified with vscode and added the relevant ignores.

I also incorporated #8204

@crusaderky crusaderky merged commit a74f7cf into dask:main Sep 26, 2023
16 of 28 checks passed
@crusaderky crusaderky deleted the no_pytest_code branch September 26, 2023 15:48
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.

None yet

4 participants