pytest-dev / pytest-dev/pytest

Very large test suites take *far* too much RAM

Open
#619 17 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

status: help wanted type: performance
Dominant language
Python
Stars
14.5k
Forks
3.4k
Avg merge
2d 9h
Merged PRs (30d)
35

Description

Originally reported by: Alex Gaynor (BitBucket: alex_gaynor, GitHub: alex_gaynor)


The cryptography test suite on OS X -- which is 149150 test functions (almost entirely generated with @pytest.mark.parametrize) -- results in a CPython 2.7 process which, after collection, takes 1.26GB or so.

This is about 8KB per test. This seems like way too much, it would be fantastic to bring this significantly down.


Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing collection of the cryptography suite with its many @pytest.mark.parametrize-generated test functions on CPython 2.7, then inspect pytest's collection and parametrization paths for the sources of per-test memory use. Done means substantially reducing the approximately 1.26GB post-collection footprint without changing the collected test set.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
performance, testing
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.