Skip to content

No prompt running memory profiler against pytest #355

Description

@hectorcanto

I'm trying to run memory_profiler against pytest but no prompt or logging is shown (while it does record a dat file for the plot).

I tried:

python -m memory_profiler pytest
mprof run pytest 
mprof run python -m pytest
pytest

with @profile, with pytest -s to avoid prompt capture or

fp = open('memory_profiler.log', 'w+')

@profile(stream=fp)

I added the decorator, either in a single test or in a function being used by that single test.

Relevant information:

  • python 3.8.9
  • pytest 6.2.5
  • memory-profile 0.60.0
  • inside a virtualenv

Any suggestions?
Thanks for any help

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions