From f41df327a91e828599d4d6d1351d4d70ef9dbd35 Mon Sep 17 00:00:00 2001 From: holger krekel Date: Sat, 30 Apr 2022 08:04:33 +0200 Subject: [PATCH] add a little bench file -- "pytest tests/bench_empty.py --durations=10" will tell you how much overhead there is --- python/tests/bench_test_setup.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 python/tests/bench_test_setup.py diff --git a/python/tests/bench_test_setup.py b/python/tests/bench_test_setup.py new file mode 100644 index 000000000..1091d1f4a --- /dev/null +++ b/python/tests/bench_test_setup.py @@ -0,0 +1,18 @@ +""" +run with: + + pytest -vv --durations=10 bench_empty.py + +to see timings of test setups. +""" + +import pytest + + +class TestEmpty: + def test_prepare_setup_measurings(self, acfactory): + acfactory.get_many_online_accounts(5) + + @pytest.mark.parametrize("num", range(0, 5)) + def test_setup_online_accounts(self, acfactory, num): + acfactory.get_many_online_accounts(num)