Skip to content
Advertisement

Tag: python-3.9

pytest is not running conftest.py to pick up custom command args

In a project im working on we have a step where we export a csv before exporting we run a regression test step against the report using pytest. pytest is invoked using the following command –sample and –expectations are custom args defined in the conftest.py using the following when calling this code locally it works pytest finds the conf but

Weird results of two performance tests

For some performance critical code, I am doing extremely basic performance tests to figure out what’s slow and what’s fast. Please excuse my terrible timing method, as I have basically no idea what I’m doing. Consider these two functions : and Does anyone know why testTenBillion is taking more than ten times longer than testOneBillion to finish ? I would

Pygame installed on windows, getting “pygame.error: Failed loading libwebp-7.dll” when trying to call pygame.image.load()

I’ve got python 3.9.1 running on a windows 10 machine. I have pygame 2.0.1 installed on my machine via pip (python -m pip install https://github.com/pygame/pygame/releases/download/2.0.1/pygame-2.0.1-cp39-cp39-win_amd64.whl) however on calling pygame.image.load(“file.png”) I get the error: pygame.error: Failed loading libwebp-7.dll: The specified module could not be found. I’ve tried installing through pip install pygame and running the tests in pygame.tests but they run

Discord Python Bot Multiple Value in embed field

So i have a discord bot (using python) that connect to a sqlite database, and i want to show the data using embed. The data is containing my daily anime schedule. Here’s the code : The problem is this Discord Embed There are 2 ‘Sunday’ which is not what i wanted. What i want is (example for Sunday), the ‘Value’

What is __peg_parser__ in Python?

I was using the keyword built-in module to get a list of all the keywords of the current Python version. And this is what I did: And in the keyword.kwlist list there is __peg_parser__. So to see what it does, I type __peg_parser__ in a Python 3.9 interpreter on Windows (you’ll get the same output on Mac OS and Linux

Advertisement