Hey Kinyanjui. Thanks for this series.
I'm just getting started with pytest. I have a program that has multiple user inputs. I wrote 3 basic tests so far. All using if statements then asserts.
When I run pytest card.py -s, the program runs and I have to input all the data, then I get the message whether the tests have passed or not.
My question is, how can I run the tests without the code having to run? Does it depend on how I wrote the tests?
Hey @dmahely
! Thanks for reading, and I'm glad you liked it. Sorry for the late reply, it's been a while since I was here.
You can automate the tests by passing in mock data. Do you have the code hosted on GitHub or somewhere I can have a look so I can guide you on how to do it?
Is that what automated tests mean? 😅
The code was for a technical test that I've since submitted, and the instructions included not putting it on GitHub. May I reach out to you on Twitter?
Hey Kinyanjui. Thanks for this series.
I'm just getting started with pytest. I have a program that has multiple user inputs. I wrote 3 basic tests so far. All using if statements then asserts.
When I run
pytest card.py -s
, the program runs and I have to input all the data, then I get the message whether the tests have passed or not.My question is, how can I run the tests without the code having to run? Does it depend on how I wrote the tests?
Hey @dmahely ! Thanks for reading, and I'm glad you liked it. Sorry for the late reply, it's been a while since I was here.
You can automate the tests by passing in mock data. Do you have the code hosted on GitHub or somewhere I can have a look so I can guide you on how to do it?
Is that what automated tests mean? 😅
The code was for a technical test that I've since submitted, and the instructions included not putting it on GitHub. May I reach out to you on Twitter?
Yeah, feel free to reach out on Twitter.