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

Automatically generate hints that show test inputs #11

Open
ChrisMayfield opened this issue Oct 3, 2023 · 0 comments
Open

Automatically generate hints that show test inputs #11

ChrisMayfield opened this issue Oct 3, 2023 · 0 comments

Comments

@ChrisMayfield
Copy link
Member

Another idea from today's meeting. We have a lot of test code like this:

actual = addressing.generate_addresses("Carrier Drive", 1000, 1030, 10)
self.assertEquals(['1000 Carrier Drive', '1010 Carrier Drive', '1020 Carrier Drive'],
                  actual, msg='generate_addresses("Carrier Drive", 1000, 1030, 10)')

We could write new methods (Ex: assertEqualHint) that takes function, args (as a tuple), and expected as parameters, generates the msg automatically, calls the function with the given arguments, and then does the assertion. That would also make giving consistent and correct feedback easier. Sometimes instructors accidentally do (expected, actual) based on JUnit, which is confusing, because students think the expected value is what their function returned.

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