logo

... test.


We've got a base project going for us, which is nice. But let's add some proper unit tests as well as some code formatters! Note; you can find the live repository for this project here.


Notes

Check out our pytest series if you're unfamiliar. To install pytest locally, run:

python -m pip install pytest

After creating the test folder and the empty __init__.py file you can add a single file called test_basics.py with a test in it.

from clumper import Clumper

def test_empty_list():
    assert len(Clumper([]).collect()) == 0

You can confirm that pytest works by running:

pytest

Note; you can find the live repository for this project here.


Feedback? See an issue? Something unclear? Feel free to mention it here.

If you want to be kept up to date, consider getting the newsletter.