From 5c131498d140e172c5471929be4f30c65a200547 Mon Sep 17 00:00:00 2001 From: "loic@dachary.org" Date: Thu, 15 Dec 2016 18:33:16 +0100 Subject: also use AST for while constants in python-2.7 #502 The node.id is set to False, True or None is python-2.7: there is no reason to only check for it with python-3. It is more reliable than using the DEFAULT_PARTIAL_ALWAYS regexps on source lines. close #502 --HG-- branch : issue-502-7 --- tests/modules/zerocoverage/zero.py | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 tests/modules/zerocoverage/zero.py (limited to 'tests/modules/zerocoverage/zero.py') diff --git a/tests/modules/zerocoverage/zero.py b/tests/modules/zerocoverage/zero.py new file mode 100644 index 00000000..6ae283f1 --- /dev/null +++ b/tests/modules/zerocoverage/zero.py @@ -0,0 +1,3 @@ +def method(self): + while True: + return 1 -- cgit v1.2.1