datacamp / sqlwhat

https://sqlwhat.readthedocs.io
GNU Affero General Public License v3.0
3 stars 8 forks source link

use subset of unit tests to examine feedback messages #28

Closed machow closed 7 years ago

machow commented 7 years ago

Many tests have the form

def test_test_has_columns_fail():
    state = prepare_state({'a': [1,2,3]}, {})
    with pytest.raises(TF): cr.test_has_columns(state)

For some of them, it would be useful to optionally view their feedback message. Could do this by doing something like

@pytest.mark.feedback
def test_something():
    ....

Then they can be viewed by running from command-line...

pytest -s -m "feedback"    # plus some meta-parameter telling tests to print feedback
machow commented 7 years ago

This is being done in https://github.com/datacamp/sqlwhat/tree/feature-speaker , so should be easy to extend