Closed Bobronium closed 3 years ago
As mentioned in https://github.com/b0g3r/perseus/issues/6#issuecomment-721915239, running subprocess for each test is really slow. Using inprocess pytest.main() is about five times faster on current tests and I finally got it to work 🎉:
pytest.main()
$ pytest tests/test_snapshot.py --runpytest=subprocess:
$ pytest tests/test_snapshot.py --runpytest=subprocess
======================== 2 passed, 2 warnings in 0.96s =========================
$ pytest tests/test_snapshot.py --runpytest=inprocess:
$ pytest tests/test_snapshot.py --runpytest=inprocess
======================== 2 passed, 2 warnings in 0.18s =========================
Also moved PerseusTester to conftest.py
Thank you for your contribution, this speed-up is awesome! Of course, it looks ugly, but it's not your fault, this project promises to be hacky as hell 🌚
As mentioned in https://github.com/b0g3r/perseus/issues/6#issuecomment-721915239, running subprocess for each test is really slow. Using inprocess
pytest.main()
is about five times faster on current tests and I finally got it to work 🎉:$ pytest tests/test_snapshot.py --runpytest=subprocess
:$ pytest tests/test_snapshot.py --runpytest=inprocess
:Also moved PerseusTester to conftest.py