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

fix: defer snapshot default extension import #734

Merged
merged 11 commits into from
Apr 25, 2023
Prev Previous commit
Next Next commit
wip: use mkpydir
Noah Negin-Ulster authored and noahnu committed Apr 25, 2023
commit 5ffbe6d6f1aca5d336233655ef4b713b9236b5ce
Original file line number Diff line number Diff line change
@@ -15,19 +15,20 @@ def cache_clear():

@pytest.fixture
def testfile(testdir):
subdir = testdir.mkdir(SUBDIR)
subdir = testdir.mkpydir(SUBDIR)

Path(
subdir,
"extension_file.py",
).write_text(
textwrap.dedent(
data=textwrap.dedent(
"""
from syrupy.extensions.single_file import SingleFileSnapshotExtension
class MySingleFileExtension(SingleFileSnapshotExtension):
pass
"""
)
),
encoding="utf-8",
)

testdir.makepyfile(