def f(b): if False: removeme elif b: c(1) else: c(2)
def f(b): c.reset() if c(1): removeme elif c(2): removeme elif b: x=1 else: c(3)
def removemybody_method(self, a=c(3), b=c(4)): removeme
def removemybody(a=c(1), b=c(2)): removeme
# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see <https://www.gnu.org/licenses/>. from tests.side_effect_utils import c # This is commented because of the added pragma: nocov # _magicov_expected_uncovered_lines = 2 def removemybody(a=c(1), b=c(2)): removeme class Klass: def removemybody_method(self, a=c(3), b=c(4)): removeme c(5)
# Copyright (C) 2020 Matías Lang # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see <https://www.gnu.org/licenses/>. from tests.side_effect_utils import c def f(): removeme c(1) c(2)
# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see <https://www.gnu.org/licenses/>. from tests.side_effect_utils import c for _ in c(1, []): removeme c(2) while c(3, False): removeme c(4) c.reset() for _ in 'a': c(1) break else:
def deco2(f): c(n) return f
# the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see <https://www.gnu.org/licenses/>. from tests.side_effect_utils import c # This is commented because of the added pragma: nocov # _magicov_expected_uncovered_lines = 1 n = 5 def func(): global n n = 1 def func2(): global n func() c(n)
# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see <https://www.gnu.org/licenses/>. from tests.side_effect_utils import c if c(1): removeme elif c(2, True): c(3) c(4) c.reset() if c(1): removeme else: if c(2, True): c(3) c(4)
async def async_for_empty_list(): async for _ in iterator(False): c(2) c(3) async for _ in iterator(True): removeme
async def not_called(): removeme async def covered_async(): return 5 asyncio.run(covered_async()) async def iterator(empty): if not empty: yield 1 return c(1) async def async_for_empty_list(): async for _ in iterator(False): c(2) c(3) async for _ in iterator(True): removeme asyncio.run(async_for_empty_list())
def f(): a = 1 c(2) return x = 5 removeme
# Copyright (C) 2020 Matías Lang # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see <https://www.gnu.org/licenses/>. from tests.side_effect_utils import c def f(): a = 1 c(2) return x = 5 removeme c(1) f() c(3)
from tests.side_effect_utils import c if True: a = 1 else: removeme if False: removeme else: a = 2 if False: removeme if c(1): a = 1 if c(2): a = 1 else: a = 2 if False: removeme c(3) class Klass(object): def __init__(self): x = 5