diff options
author | loic@dachary.org <loic@dachary.org> | 2016-12-15 18:33:16 +0100 |
---|---|---|
committer | loic@dachary.org <loic@dachary.org> | 2016-12-15 18:33:16 +0100 |
commit | 5c131498d140e172c5471929be4f30c65a200547 (patch) | |
tree | a02534e2f0b9269dea5aca1d8bde889ab859189e /tests/modules | |
parent | 88207df5fa00861bf42f0993b23ce541817b72dd (diff) | |
download | python-coveragepy-git-5c131498d140e172c5471929be4f30c65a200547.tar.gz |
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
Diffstat (limited to 'tests/modules')
-rw-r--r-- | tests/modules/zerocoverage/__init__.py | 1 | ||||
-rw-r--r-- | tests/modules/zerocoverage/__main__.py | 1 | ||||
-rw-r--r-- | tests/modules/zerocoverage/zero.py | 3 |
3 files changed, 5 insertions, 0 deletions
diff --git a/tests/modules/zerocoverage/__init__.py b/tests/modules/zerocoverage/__init__.py new file mode 100644 index 00000000..0acf595e --- /dev/null +++ b/tests/modules/zerocoverage/__init__.py @@ -0,0 +1 @@ +# no empty file to please hg diff --git a/tests/modules/zerocoverage/__main__.py b/tests/modules/zerocoverage/__main__.py new file mode 100644 index 00000000..91082160 --- /dev/null +++ b/tests/modules/zerocoverage/__main__.py @@ -0,0 +1 @@ +print('done') 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 |