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

support inline approvals on cyber-dojo #159

Open
nitsanavni opened this issue Feb 11, 2024 · 3 comments
Open

support inline approvals on cyber-dojo #159

nitsanavni opened this issue Feb 11, 2024 · 3 comments

Comments

@nitsanavni
Copy link
Contributor

doesn't quite work as expected yet, see here - https://cyber-dojo.org/kata/edit/b0U7pS

@nitsanavni
Copy link
Contributor Author

experimenting with cyber-dojo + inline approvals + auto-approval
https://cyber-dojo.org/kata/edit/US1feV

(almost works)

@nitsanavni
Copy link
Contributor Author

nitsanavni commented Apr 28, 2024

Found the problem:

We're doing a shallow file compare (only comparing stats), and if the received is the exact length as approved we get a false positive.

if filecmp.cmp(approved_path, received_path):

for inline in cyber-dojo this line should be:

if filecmp.cmp(approved_path, received_path, shallow=is_not_cyber_dojo()):

see here:
https://cyber-dojo.org/kata/edit/bHvRz1

@nitsanavni
Copy link
Contributor Author

update: fixed in latest release

now waiting to be merged to cyberdojo
cyber-dojo-languages/python-approval-pytest#4
cyber-dojo-languages/python-approval-unittest#4

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

1 participant