-
Notifications
You must be signed in to change notification settings - Fork 31
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
test_function_definition: can we test_object within it? #9
Comments
Have you tried using
However Filip and me have been thinking about making the notation to test things more 'Pythonic'. These functions are actually in this kind of format (with the lambda/custom defined functions and stuff), because that's how it was done in R. However in Pyhton in might make more sense to write the test you'd like to do like this: Below is an idea, code won't work
This could make testing in Python more "object-oriented-ish". You could go to a notation like this:
I'm sure we'll discuss this further when Filip's back. Might be interesting to include you in that conversation to get your feedback. |
@franciscastro and I will try |
@hugobowne did you figure it out? |
test_function_definition('shout', body = lambda: test_object_after_expression('shout_word')) works! @vincentvankrunkelsven i agree we should discuss a more more "object-oriented-ish" python sct with filip :-) |
hi! i love that you can
test_function
withintest_function_definition
: can we also test objects within the scope?@franciscastro tried but to no avail yet. If so, could you possibly provide a quick example of usage in the case of this exercise:
https://campus.datacamp.com/courses/1113/2464?ex=3
thanks!
The text was updated successfully, but these errors were encountered: