Esempio n. 1
0
 def test_inversed_region(self):
     """Test inversed region."""
     a = 20  # pylint: disable=invalid-name
     b = 10  # pylint: disable=invalid-name
     region = NormalizedRegion(_RegionMock(a, b))
     self.assertEqual(b, region.a)
     self.assertEqual(a, region.b)
     self.assertEqual(10, region.length())
Esempio n. 2
0
 def test_begin_end_inversed(self):
     """Test normal region."""
     a = 20  # pylint: disable=invalid-name
     b = 10  # pylint: disable=invalid-name
     region = NormalizedRegion(a, b)
     self.assertEqual(b, region.a)
     self.assertEqual(a, region.b)
     self.assertEqual(10, region.length())