codewars / docs

The Codewars Docs :construction: WIP
https://docs.codewars.com
MIT License
55 stars 191 forks source link

HOWTO: Train on Python kata locally #211

Open hobovsky opened 3 years ago

hobovsky commented 3 years ago

Show how to set up local environment to create Python kata or train on them.

Steffan153 commented 3 years ago

AFA running tests locally, is there a way to easily convert this to something more... meaningful to the user? image Or should I just say don't pay attention to these <X::> things?

kazk commented 3 years ago

There's no built-in way to make nice output for languages using a custom test framework.

You can somewhat improve it by piping it to sed or something similar:

$ run-tests | sed 's/^<\(DESCRIBE\|COMPLETEDIN\)::>//;s/^<IT::>/  /;s/^<\(PASSED\|FAILED\|ERROR\)::>/    /'

should make that

Hi
  Hi
    Test Passed
    1 should equal 2
0.07
0.18

Or write some script to do more fancy stuff.