How do I use Scalene to profile my Pytest test suit?
Asked Answered
K

1

7

I want to use Scalene to profile my Pytest test suit

Typically I run the test suit by running

pytest

So I tried

scalene pytest

which doesn't work as I expect.

What is the correct way to run my test suit through scalene?

Kirshbaum answered 22/2, 2023 at 21:12 Comment(0)
K
8

Since Scalene replaces your python interpreter, you have to run pytest as a module from Scalene, like so:

scalene -m pytest

which yields the desired result

Kirshbaum answered 22/2, 2023 at 21:14 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.