Comments (6)
@hugo You are correct, this currently doesn't work:
test_function("open", index=1, args=[0], ...)
test_function("open", index=1, args=[1], ...)
I remember telling you you could give argument-specific feedback like that in pythonwhat
but I forgot it is disabled. This is because each function call can only be tested once, it gets blacklisted afterwards because of some implementation technicalities. @filipsch and me will discuss if this is desirable behaviour and fix it/provide an alternative.
from pythonwhat.
@vincentvankrunkelsven either way, we need a way to fix this: either we want to be able to pass a list that has the same length as the args in incorrect_msg
, either we want the blacklisting to work better that you can check the same function call with different test_function()
calls (this is how it's done in testwhat
, mainly for backwards compatibility reasons).
from pythonwhat.
@hugobowne I'll look into it. Can't tell when will be fixed.
from pythonwhat.
thanks you guys are great 👍
as stated, i will beta test irrespective of this functionality. of course, the sooner the better as it improves user experience so very much ;-)
PEACE!
from pythonwhat.
I'm working on a fix for this, but I guess it'll only be possible to specify multiple incorrect_msg
by simply writing multiple test_function()
calls where you each time specifically mention a single argument or keyword.
If we would make it possible to specify multiple incorrect messages, then it's hard to figure out which message refers to which argument or which keyword.
from pythonwhat.
@hugobowne This is currently on staging, will be deployed to master as soon as Robin updates the docker-container (with python autocomplete and bokeh)
This fix allows you to use the syntax vincent used for argument-specific feedback
test_function("open", index=1, args=[0], ...)
test_function("open", index=1, args=[1], ...)
I've also added a piece of documentation on the test_function()
article:
https://github.com/datacamp/pythonwhat/wiki/test_function#example-3-custom-feedback
Peace out.
from pythonwhat.
Related Issues (20)
- Better support to check pandas chains
- Get rid of test_with()
- More clearly document check_args() for check_function_def()
- Fix old SCTs that fail assertions HOT 2
- check_class_def support HOT 6
- check_function inside for loop can't find aliases outside
- Expose and document `has_error()` function
- Incorrect highlighting because of flaws in ObjectAssignmentParser
- Add article about message generation
- Improve API for checking the signature in check_function_def
- Reference: check_object missing explanation of two params HOT 1
- Unable to Install HOT 2
- Document the order to check chained functions
- The easy way to extract the message associated with "TestFail" HOT 2
- Specifying filenames to setup_state() HOT 2
- Add a tolerance argument to has_equal_value()
- Add a test based on the line of a code
- check_function() not working as documented (or what am I missing?)
- has_output() doesn't work with two 'print'
- Small documentation error on check_function_def
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pythonwhat.