Skip to content

Commit

Permalink
add ensure_gc fixture
Browse files Browse the repository at this point in the history
Signed-off-by: Jinzhe Zeng <[email protected]>
  • Loading branch information
njzjz committed Jan 26, 2024
1 parent 908e0d7 commit 95d6df3
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions source/tests/conftest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# SPDX-License-Identifier: LGPL-3.0-or-later
import gc

import pytest


@pytest.fixture(autouse=True)
def ensure_gc():
"""Wordaround to resolve OOM killed issue in the GitHub Action."""
# https://github.com/pytest-dev/pytest/discussions/8153#discussioncomment-214812
gc.collect()

0 comments on commit 95d6df3

Please sign in to comment.