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

Clock: add and subtract expect a string, not a Clock #2010

Open
IsaacG opened this issue Apr 16, 2022 · 2 comments
Open

Clock: add and subtract expect a string, not a Clock #2010

IsaacG opened this issue Apr 16, 2022 · 2 comments

Comments

@IsaacG
Copy link
Member

IsaacG commented Apr 16, 2022

The add and subtract methods in the Clock test data have expected results which are strings. In Python, this translates to allowing solutions to return a string and not a Clock. I'm not sure how this manifests in other languages.

How burdensome would it be to change the expected results to be a clock instead? Would that be valid canonically (ie across tracks)?

@SaschaMann
Copy link
Contributor

On the Julia track we expect objects but also have tests for the string representation of those objects.

How burdensome would it be to change the expected results to be a clock instead? Would that be valid canonically (ie across tracks)?

One would either have to duplicate or reimplement every single test case.


I don't think this change would be worth it. The canonical data isn't student-facing, it exists for the maintainers. They can choose how to interpret it and can convert between strings and objects however they like. Even a generator could trivially deal with this translation.

@ErikSchierboom
Copy link
Member

I don't think this change would be worth it. The canonical data isn't student-facing, it exists for the maintainers. They can choose how to interpret it and can convert between strings and objects however they like. Even a generator could trivially deal with this translation.

Agreed. A track is free to have the implementation compare objects instead of strings.

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

No branches or pull requests

3 participants