-
Notifications
You must be signed in to change notification settings - Fork 103
Open
Description
Description:
When using pytest
with Python 3.12, an error occurs due to the snapshottest
package trying to import the deprecated imp
module, which was removed in Python 3.12. This causes the following error:
ModuleNotFoundError: No module named 'imp'
Steps to Reproduce:
- Install Python 3.12.
- Install
pytest
andsnapshottest
. - Run
pytest
with any tests that includesnapshottest
.
Expected Behavior:
pytest
should run without errors related to the imp
module.
Actual Behavior:
pytest
fails with the error: ModuleNotFoundError: No module named 'imp'
.
Possible Solution:
- Replace
imp
withimportlib
asimp
is deprecated and removed in Python 3.12. - Consider upgrading the
snapshottest
package to a version that is compatible with Python 3.12, or provide a patch to handle this issue.
Environment:
- Python 3.12 / Python 3.13
- pytest 8.3.5
- snapshottest 0.6.0
pokidovea-playrix, robsonpiere, EvgeneOskin, dackland-wavefin and BeardedPhill
Metadata
Metadata
Assignees
Labels
No labels