bloomberg / bloomberg/pytest-memray

Configuration with `pytest.ini` not working

Open
#135 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
Python
Stars
423
Forks
39
Avg merge
5h 19m
Merged PRs (30d)
1

Description

## Bug Report

**Current Behavior**
Configuration in a `pytest.ini` or `pyproject.toml` file does not work.

**Input Code**

`pytest.ini`:

```pytest.ini
[pytest]
addopts = --memray
memray = true
hide_memray_summary = true
```

Or the `pyproject.toml` alternative:

```pyproject.toml
[tools.pytest.ini_options]
addopts = "--memray"
memray = true
hide_memray_summary = true
```

**Expected behavior/code**

With this example configuration, I would expect the memray summary to not show after running `pytest`. Putting in any other configuration option has no effect either. When running `pytest --memray --hide-memray-summary`, or other options, this works as expected.

**Environment**

- Python(s): Python 3.12, other versions not tested

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue with the shown pytest.ini and pyproject.toml configurations, then compare their behavior with the equivalent command-line options. The work is done when memray plugin options such as memray and hide_memray_summary are honored from both configuration formats and the relevant behavior is covered by tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.