From 42b446689785bac4d562b8c1bfcd03030b6e3f57 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 13 Feb 2022 05:50:19 +0100 Subject: [PATCH] ignore controls that should not be reached in coverage --- InvenTree/part/test_bom_item.py | 2 +- InvenTree/part/test_category.py | 2 +- InvenTree/part/test_param.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/InvenTree/part/test_bom_item.py b/InvenTree/part/test_bom_item.py index 5ce75d3657..7466277118 100644 --- a/InvenTree/part/test_bom_item.py +++ b/InvenTree/part/test_bom_item.py @@ -55,7 +55,7 @@ class BomItemTest(TestCase): with self.assertRaises(django_exceptions.ValidationError): # A validation error should be raised here item = BomItem.objects.create(part=self.bob, sub_part=self.bob, quantity=7) - item.clean() + item.clean() # pragma: no cover def test_integer_quantity(self): """ diff --git a/InvenTree/part/test_category.py b/InvenTree/part/test_category.py index 75261378b0..f25f0b87ea 100644 --- a/InvenTree/part/test_category.py +++ b/InvenTree/part/test_category.py @@ -127,7 +127,7 @@ class CategoryTest(TestCase): with self.assertRaises(ValidationError) as err: cat.full_clean() - cat.save() + cat.save() # pragma: no cover self.assertIn('Illegal character in name', str(err.exception.error_dict.get('name'))) diff --git a/InvenTree/part/test_param.py b/InvenTree/part/test_param.py index 85eea7ee57..fe3514d807 100644 --- a/InvenTree/part/test_param.py +++ b/InvenTree/part/test_param.py @@ -44,7 +44,7 @@ class TestParams(TestCase): with self.assertRaises(django_exceptions.ValidationError): t3 = PartParameterTemplate(name='aBcde', units='dd') t3.full_clean() - t3.save() + t3.save() # pragma: no cover class TestCategoryTemplates(TransactionTestCase):