I am picking up Python in a serious way, these days.
While reading through the syntax and standard libraries, I am also super-curious about the Python ecosystem.
In particular, I want to write code that is all unit-tested and then create repo's that enforce integration-testing.
Then, I want to have, like, functional testing suites for more end-to-end testing.
I have lots of experience with Java-JUnit-Maven and was wondering if Python adopts a similar build-test-deploy model or has some new patterns for me to learn?
Also, I've initially looked into the 'unittest' module. I've written some unit tests for my example application, ran those in the IDE, observed results... OK, that's cool :)
Then, I was interested in integrating my example application into a CI-CD system and wrote a little github workflow YAML file that sets up, builds and then runs tests - but that was using the 'pytest' module.
Is 'pytest' a "competitor" to 'unittest' or a complement (and, in that case, what is each used for?)?
'unittest' was kinda easy for me to understand, because it feels a lot like JUnit but in Python...
'pytest' was a little more obscure, as it uses a lot of standard folder and file names, which you need to know about in order to configure it correctly... But once I managed, it does look more sleek.
Yeah, I see my question is a bit broad and messy. I am just going to appreciate any discussion, idea, suggestion, etc :)
While reading through the syntax and standard libraries, I am also super-curious about the Python ecosystem.
In particular, I want to write code that is all unit-tested and then create repo's that enforce integration-testing.
Then, I want to have, like, functional testing suites for more end-to-end testing.
I have lots of experience with Java-JUnit-Maven and was wondering if Python adopts a similar build-test-deploy model or has some new patterns for me to learn?
Also, I've initially looked into the 'unittest' module. I've written some unit tests for my example application, ran those in the IDE, observed results... OK, that's cool :)
Then, I was interested in integrating my example application into a CI-CD system and wrote a little github workflow YAML file that sets up, builds and then runs tests - but that was using the 'pytest' module.
Is 'pytest' a "competitor" to 'unittest' or a complement (and, in that case, what is each used for?)?
'unittest' was kinda easy for me to understand, because it feels a lot like JUnit but in Python...
'pytest' was a little more obscure, as it uses a lot of standard folder and file names, which you need to know about in order to configure it correctly... But once I managed, it does look more sleek.
Yeah, I see my question is a bit broad and messy. I am just going to appreciate any discussion, idea, suggestion, etc :)