Skip to content

Commit 52c9bef

Browse files
committed
Coverage.
1 parent 1270ace commit 52c9bef

3 files changed

Lines changed: 6 additions & 2 deletions

File tree

src/nti/schema/fieldproperty.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
try:
2121
from Acquisition import aq_base
2222
from Acquisition.interfaces import IAcquirer
23-
except ModuleNotFoundError:
23+
except ModuleNotFoundError: # progma: no cover
2424
pass
2525
else:
2626
class AcquisitionFieldProperty(FieldProperty):

src/nti/schema/tests/test_field.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -829,6 +829,10 @@ def fromBytes(self, _value):
829829
assert_that(converter(''), is_('from unicode'))
830830
assert_that(converter(1), is_(b'from object'))
831831

832+
def test_cover(self):
833+
converter = self._makeOne(True)
834+
self.assertEqual(str(converter), '<FieldConverter for True>')
835+
832836
class TestFunctions(unittest.TestCase):
833837

834838
def test_fixup_Object_field_mapping_requires_key_and_value(self):

src/nti/schema/tests/test_fieldproperty.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def test_aq_property(self):
5151
try:
5252
from Acquisition import Implicit
5353
from ExtensionClass import Base
54-
except ModuleNotFoundError:
54+
except ModuleNotFoundError: # pragma: no cover
5555
self.skipTest('Acquisition not installed')
5656

5757
from nti.schema.fieldproperty import AcquisitionFieldProperty

0 commit comments

Comments
 (0)