Python for Decision Makers and Business Leaders Transcripts
Lecture: What else can you test with Python
Login or purchase this course to watch this video and the rest of the course contents.
0:00 Well it makes sense that Python can test itself. Most programming languages have some way to test that their own code is working.
0:07 But with Python you can test other things too. There's cool plug-ins for Pytest that lets you just describe how
0:15 things like APIs are supposed to behave. And then Pytest will go out, talk to that API and very, yeah, it's returning the right data
0:21 or the right status code, and so on. So if you need to test APIs from the outside, Pytest is awesome! Pytest is also good at testing IoT things.
0:30 Much of IoT's actually written in Python. Things like Micro Python and Circuit Python. But even when there's not, Python can interact
0:38 with those devices and test them of course. Hardware: things like modems and cell phones and other physical devices that
0:45 you need to communicate with; Python can test those. In fact, we already saw that Python Bytes podcast 'cause we did that in the data signing section.
0:53 My co-host there, Brian Okken, works at a company where they use Python all over the place to test things like cellular modems
1:00 to make sure that they're working right. So yeah, if you've got hardware to test Python is a really great option, 'cause it's easy
1:06 and simple to write those tests against those devices. Also, other languages integrate with Python. C and C++, absolutely; Rust, it's easy to integrate
1:16 with those libraries in those languages. So if you've got a library, let's just say, C++ and you want to test it, you could write that in C++
1:24 and maybe that makes sense. But you could also write in Python and test those other languages. So here's just a sampling of what
1:30 you can test with Python and Pytest. There are many more use cases. I didn't even mention Selenium for interacting with remote websites
1:38 and complicated things like, Hey, I need to go login here, find this page, click this link and then verify something.
1:45 Python I beautiful for that kind of stuff too. So yeah, you can test a lot of things with Python.