示例#1
0
 def test_postions(self):
     range = Range((1, 3), (2, 4))
     assert range.toPositionTuples() == ((1, 3), (2, 4))
     assert not range.isInverse()
     assert range.isPositions()
     assert range.isTwoPositions()
     range.assertPositions()
     range.assertTwoPositions()
示例#2
0
 def test_lines(self):
     range = Range(1, 3)
     assert range == Range((1, 3))
     assert range.toLineTuples() == (1, 3)
     assert not range.isInverse()
     assert range.isLines()
     assert range.isTwoLines()
     range.assertLines()
     range.assertTwoLines()
示例#3
0
 def test_line(self):
     range = Range(3)
     assert range == Range(3, 3)
     assert range.upperY() == 3
     assert range.lowerY() == 3
     assert range.toLineTuples() == (3, 3)
     assert not range.isInverse()
     assert range.isLines()
     assert range.isOneLine()
     range.assertLines()
     range.assertOneLine()
示例#4
0
 def test_position(self):
     range = Range(1, 3, isPosition=True)
     range2 = Range((1, 3), isPosition=True)
     range3 = Range((1, 3), (1, 3))
     assert range == range2
     assert range == range3
     assert range.toPositionTuple() == (1, 3)
     assert range.toPositionTuples() == ((1, 3), (1, 3))
     assert not range.isInverse()
     assert range.isPositions()
     assert range.isOnePosition()
     range.assertPositions()
     range.assertOnePosition()