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.

Image of Datadog

The Essential Toolkit for Front-end Developers

Take a user-centric approach to front-end monitoring that evolves alongside increasingly complex frameworks and single-page applications.

Get The Kit

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay