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

Actually test the Python translator #240

Merged
merged 3 commits into from
Apr 20, 2024
Merged

Conversation

DanielRosenwasser
Copy link
Member

This PR adds a test for Python translators by mocking a model and snapshotting the log.

Based on feedback from @gvanrossum where he pointed out that we don't actually use the repaired prompt (I broke this in #203). Some of the fixes are already in #238.

@DanielRosenwasser DanielRosenwasser merged commit 9f644b6 into main Apr 20, 2024
8 checks passed
@DanielRosenwasser DanielRosenwasser deleted the test_translator branch April 20, 2024 01:32
@@ -0,0 +1,137 @@
# serializer version: 1
Copy link
Contributor

Choose a reason for hiding this comment

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

What is this file? I don't see it mentioned anywhere, but maybe you have some clever test setup that uses this?

Copy link
Member Author

@DanielRosenwasser DanielRosenwasser Apr 26, 2024

Choose a reason for hiding this comment

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

Yeah, syrupy is a pytest plugin that makes it easy-ish to generate snapshot/baseline tests. They have a default snapshot format called Amber (which I've never heard of before using it).

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