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

Add a public API for checking values against Value annotations #111

Closed
chrispyles opened this issue Oct 3, 2021 · 1 comment · Fixed by #112
Closed

Add a public API for checking values against Value annotations #111

chrispyles opened this issue Oct 3, 2021 · 1 comment · Fixed by #112

Comments

@chrispyles
Copy link
Contributor

As titled. For example, to check whether a value annotation is satisfied by some object:

v = pybryt.Value(obj)
v.check_against(other_obj)

Allows instructors to test the robustness of their annotations and engage in unit testing assignments. Also useful for demonstration purposes.

Any method implementing this feature should just wrap the object in the tuple abstraction for a memory footprint observed value and use existing methods to validate the pseudo-footprint.

@chrispyles
Copy link
Contributor Author

A similar method should also be added to the Attribute annotation.

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 a pull request may close this issue.

1 participant