Fix test runner progress for py.test
[idea/community.git] / python / helpers / pycharm / pytest_teamcity.py
index 1de9e20be2c9a69cd37429b55bf085d860bf606c..50b6ede17010cf1be37f34ba9e71507ce15fdded 100644 (file)
@@ -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]: