Skip to content

Commit abb1219

Browse files
committed
Hit one more line and give up on the remaining 2 lines => 100% coverage output
1 parent 67b9a4f commit abb1219

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

python/phonenumbers/asyoutypeformatter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ def input_digit(self, next_char, remember_position=False):
279279
if self._able_to_format:
280280
self._current_output = self._prefix_before_national_number + temp_national_number
281281
return self._current_output
282-
else:
282+
else: # pragma no cover
283283
self._current_output = temp_national_number
284284
return self._current_output
285285
else:

python/tests/asyoutypetest.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -716,3 +716,6 @@ def testEdgeCases(self):
716716
self.assertEquals('1234', formatter.input_digit('4'))
717717
phonenumberutil.SUPPORTED_REGIONS.remove('XX')
718718
del PhoneMetadata.region_metadata['XX']
719+
# Hit internal error arm
720+
formatter._national_number = ""
721+
self.assertEquals("", formatter._input_accrued_national_number())

0 commit comments

Comments
 (0)