OK-Formatted Test Cells vs. Exception-Based Test Cells #864
-
I'm trying to decide between using the OK-formatted test cells and exception-based test cells. It seems that the OK-formatted test cells are quicker to write, don't require you to pass in necessary variables as function arguments, and what I like the most is that I don't have to specify a new function name for each test. I'm wondering if there are any negatives or things I should be aware of when choosing to use OK-formatted tests instead of exception-based ones? For instance, is there something I can't do with OK-formatted that I can do with exception-based? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
There are two main things to note about OK tests:
You can find a brief guide on writing autograder tests, focusing on OK tests, here. It describes some of the common pitfalls of OK tests. Besides these two things and the limitations of exception-based tests you mentioned, they both have the same capabilities. As long as you keep in mind the items above, I personally find OK tests more ergonomic. |
Beta Was this translation helpful? Give feedback.
There are two main things to note about OK tests:
repr
sYou can find a brief guide on writing autograder tests, focusing on OK tests, here. It describes some of the common pitfalls of OK tests.
Besides these two things and the limitations of exception-based tests you mentioned, they both have the same capabilities. As long as you keep in mind the items above, I personally find OK tests more ergonomic.