From 5afa7bc6fa73357322fc2013052fbdaa37d4417d Mon Sep 17 00:00:00 2001 From: Elliot Kroo Date: Sat, 14 May 2016 16:46:07 -0700 Subject: [PATCH] Fix test runner progress for py.test This change fixes an issue where the pytest runner did not report the number of tests to the test runner, resulting in a progress bar stuck at 50%. --- python/helpers/pycharm/pytest_teamcity.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/python/helpers/pycharm/pytest_teamcity.py b/python/helpers/pycharm/pytest_teamcity.py index 1de9e20be2c9..50b6ede17010 100644 --- a/python/helpers/pycharm/pytest_teamcity.py +++ b/python/helpers/pycharm/pytest_teamcity.py @@ -43,6 +43,9 @@ if PYVERSION > [1, 4, 0]: current_file = None current_file_suite = None + def pytest_collection_finish(session): + messages.testCount(len(session.items)) + def pytest_runtest_logstart(nodeid, location): path = "file://" + os.path.realpath(os.path.join(CURRENT_DIR_NAME, location[0])) if location[1]: