First of all i read Kent Beck’s class of Smalltalk Testing, I am not very familiar with Smalltalk but the reading was quite interesting, a different approach that focuses on catching certain things that other tests can, obviously each with their respective advantages and disadvantages. Also seeing the page through the WayBack Machine makes you realize how ubly the internet was back then and makes you glad that we have beautiful web pages now, and also that we can now do things like take notes in web pages using Hypothesis for example 😉
About the pycharm and pyunit tutorial, i was unable to access the benefits of the linkedin account that allows you to watch the full tutorial even though i created my account with my tec email and everything. So i decided to search for a tutorial somewhere else and try pyunit.
Following a youtube tutorial imade some tests using examples similars to the ones i have made using JUnit before, like testing for the functionality of some calculator functions. We created the .py with all the functions that we want our calculator to have (add, subtract, multiply, divide) and then we use prints to test :D…. jk the person that made the tutorial pointed out what a horrible way of testing that is and i felt called out tbh
Moving on, we need to import the unittest module without the need to install anything because it’s one of the default packages. After that, just like in JUnit, we create our test class in which we define methods to taste our different functions made in our calculator program. Here we also have the asserts to test what the program returns againts it’s expected output:
In conclusion, i don’t thing there’s a significant difference between the XUnit frameworks for different languages, if you learn how to use one (JUnit), your intuition and a little googling will tell you how to use the other ones (pyUnit).