DEV Community

P-DR0ZD
P-DR0ZD

Posted on • Edited on

Adding tests to my SSG

This week i upgraded my SSG by adding testing so whenever i add features i can run the tests and see if my existing features still work as intended.

755a190

What framework did I use for Testing

unittest

Because my SSG is built with python i wanted to use python's built in testing framework unittest.

How did i set it up

Setting it up wasn't difficult because it was built in I created a new folder for testing and importing unittest. Then i created a folder where i can store test text documents.

What bugs did i find

I found that files that are empty break my SSG and caused it to crash so i added error checking so i would catch those errors then I made sure that my SSG still ran.

Will i use testing in the future

I think I'll still use testing it was kinda a learning curve because i needed to think about how to break my project down into steps where i could test things individually

Top comments (0)