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

TST: Properly test with pymongo, adjust profiler usage for py3.12 #346

Merged
merged 4 commits into from
Aug 27, 2024

Conversation

tangkong
Copy link
Contributor

@tangkong tangkong commented Aug 27, 2024

Description

  • Properly mark test_multi_backend as needing pymongo. (its fixtures had this decorator already, but the test still tried to run 🤷 )

Motivation and Context

Seen in #343 and others

How Has This Been Tested?

CI

Where Has This Been Documented?

This PR

Pre-merge checklist

  • Code works interactively
  • Code contains descriptive docstrings, including context and API
  • New/changed functions and methods are covered in the test suite where possible
  • Test suite passes locally
  • Test suite passes on GitHub Actions
  • Ran docs/pre-release-notes.sh and created a pre-release documentation page
  • Pre-release docs include context, functional descriptions, and contributors as appropriate

@tangkong
Copy link
Contributor Author

tangkong commented Aug 27, 2024

Python 3.12 slightly changed how the built-in cprofiler behaves. Now the following raises an error:

import cProfile

p1 = cProfile.Profile()
p1.enable()

p2 = cProfile.Profile()
# previously, p1 is silently disabled here, now python raises
p1.disable()
p2.enable()

(a very helpful comment)

The py3.12 tests only fail on the cprofile test cases, which is consistent with this issue

@tangkong tangkong changed the title TST: Properly test with pymongo TST: Properly test with pymongo, adjust profiler usage for py3.12 Aug 27, 2024
@tangkong tangkong requested a review from ZLLentz August 27, 2024 17:15
@tangkong tangkong merged commit 59b96c2 into pcdshub:master Aug 27, 2024
11 checks passed
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