Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2020
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. def test_input_is_valid(self):
  2. self.assertFalse(input_data == '')
  3.  
  4. def test_number_a_format(self):
  5. num_a = input_data.split()[0]
  6. is_valid = False
  7. if num_a[0] == '-' and num_a[1:].isdigit():
  8. is_valid = True
  9. elif num_a.isdigit():
  10. is_valid = True
  11. self.assertEqual(is_valid, True)
  12.  
  13. def test_number_b_format(self):
  14. num_b = input_data.split()[0]
  15. is_valid = False
  16. if num_b[0] == '-' and num_b[1:].isdigit():
  17. is_valid = True
  18. elif num_b.isdigit():
  19. is_valid = True
  20. self.assertEqual(is_valid, True)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement