From cfa063a9b5e1ad090e12c59e0479e50d7c92c711 Mon Sep 17 00:00:00 2001 From: will sheffler Date: Tue, 20 Sep 2016 13:26:09 -0700 Subject: [PATCH] fix issue with newer gtest_list_tests output --- pytest_cpp/google.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pytest_cpp/google.py b/pytest_cpp/google.py index aaa6206..a0cf924 100644 --- a/pytest_cpp/google.py +++ b/pytest_cpp/google.py @@ -46,6 +46,11 @@ def strip_comment(x): test_suite = None result = [] for line in output.splitlines(): + stripped = line.strip() + if (stripped.startswith('int main') or + stripped.startswith('/') or + stripped.startswith('-')): + continue has_indent = line.startswith(' ') if not has_indent and '.' in line: test_suite = strip_comment(line).strip()