this post was submitted on 02 Oct 2023
106 points (99.1% liked)

Python

6378 readers
99 users here now

Welcome to the Python community on the programming.dev Lemmy instance!

๐Ÿ“… Events

PastNovember 2023

October 2023

July 2023

August 2023

September 2023

๐Ÿ Python project:
๐Ÿ’“ Python Community:
โœจ Python Ecosystem:
๐ŸŒŒ Fediverse
Communities
Projects
Feeds

founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[โ€“] Charlotte_Thomassen@monyet.cc 1 points 5 months ago (1 children)

How is it going ? Did you solve it, or find the cause yet ?

No, but we haven't really been trying.

Our tests are written in unittest style, but run with unit test. Unfortunately, a large number of our tests rely on fixtures, as in loading a ton of data into a SQLite database and then running code against that. That's because we have DB queries all throughout our service logic, so it's quite a bit of spaghetti to try to mock the DB logic.

So instead of trying to fix the memory issues in pytest, we're refactoring our app to separate the DB calls from our service logic, which should let us easily mock the repository in our tests.

So short answer: no. Longer answer: I might be able to tell you in a few months if this approach fixes the issue.