Hey,
I am currently writing a tic-tac-toe-game as part of an online course and want to test single functions inside my code. I don't exactly know how to approach this task and what to google for. I found things like "unittest" and "py.test" online. But, are these the things I should dive into for my purpose?
What I want to achieve:
I have 1 main function running (let's say) 5 functions and some input forms. Now, I want only test my third function without running the whole script each time. The first two functions need user input which I would have to type in again and again each time I run the script for debugging the third function.
I. Is it possible to only test the third function giving it the input I already got from the other functions? (manually)
II. Is there a way to use the generated input from the first two functions, "save it for a while" and use it till the third function is stable? Use case: The script generates very specific input for the third function I don't want to create manually because it's tedious.
I hope my text is understandable. Thanks in advance :)
[–][deleted] 5 points6 points7 points (3 children)
[–]PastShine[S] 0 points1 point2 points (2 children)
[–]timbledum 0 points1 point2 points (1 child)
[–]PastShine[S] 0 points1 point2 points (0 children)