From the course: Unit Testing in Python

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Running pytest with Docker

Running pytest with Docker - Python Tutorial

From the course: Unit Testing in Python

Start my 1-month free trial

Running pytest with Docker

- [Instructor] Let's make sure VS Code is setup correctly to run Pytest and Docker. From VS Code, you can open the project repository. And from here, we've saved our project to the desktop, but for you, if you saved it elsewhere, navigate to that location. Right here, what I'll do is I'll click that folder and go no further, and we'll double click and then hit open. And you can examine the project structure on the left navigation pane, we see our scripts, folder, tests, and then you'll also notice the Docker file. So let's open this up. Now, this Docker file contains a few different things, but let me explain it first. This Docker file will enable us to run our code within a Docker container, that will act almost like a virtual machine. It will install all the packages we need and allow your test setup to be just like mine without needing to change your underlying system's configuration. All the code we execute…

Contents