DEV Community

Leonardo Cumplido
Leonardo Cumplido

Posted on • Edited on

Ninth-week check in for PSF, GSoC 2021

Hi! This is my ninth post of my GSoC 2021 series 😃

This week I did 3 things.

  1. I fixed some details of my third milestone PRs. Also, I added the final exercise that was missing in the second challenge. This was pretty straightforward.
  2. I reviewed the PRs of the other students.
  3. I had to research about pytest-vcr, a plugin for managing VCR.py cassettes, and to implement it in 2 tests of the project. See its docs here

To implement pytest-vcrcorrectly, I needed to undestand what a decorator is, and what it does, because to use pytest-vcr tools I had to add decorators to the tests functions. In a nutshell, this was necessary for a couple of tests that make API calls because sometimes this APIs are not active. What pytest-vcr does is that the fisrt time a test is run, the request to a web page is made, and a .yaml file is generated with the information of that request. Next time the same test is run, there will not be a web request. Instead, the data will be returned from the .yaml file. This not only speeds up the tests, but makes them less error prone.

This week, I can't say I got stuck somewhere, because I didn't. However, I took more time than expected in the pytest-vcr thing.

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more