Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_position():
assert Position(1, 2) == Position(1, 2)
assert Position(1, 2) != Position(2, 2)
assert Position(1, 2) <= Position(2, 2)
assert Position(2, 2) >= Position(2, 0)
assert Position(1, 2) != 'something else'
assert "1:2" == repr(Position(1, 2))
def test_range():
assert Range(Position(1, 2), Position(3, 4)) \
== Range(Position(1, 2), Position(3, 4))
assert Range(Position(0, 2), Position(3, 4)) \
!= Range(Position(1, 2), Position(3, 4))
assert Range(Position(0, 2), Position(3, 4)) != 'something else'
assert "1:2-3:4" == repr(Range(Position(1, 2), Position(3, 4)))
def test_range():
assert Range(Position(1, 2), Position(3, 4)) \
== Range(Position(1, 2), Position(3, 4))
assert Range(Position(0, 2), Position(3, 4)) \
!= Range(Position(1, 2), Position(3, 4))
assert Range(Position(0, 2), Position(3, 4)) != 'something else'
assert "1:2-3:4" == repr(Range(Position(1, 2), Position(3, 4)))
def test_position():
assert Position(1, 2) == Position(1, 2)
assert Position(1, 2) != Position(2, 2)
assert Position(1, 2) <= Position(2, 2)
assert Position(2, 2) >= Position(2, 0)
assert Position(1, 2) != 'something else'
assert "1:2" == repr(Position(1, 2))
def test_range():
assert Range(Position(1, 2), Position(3, 4)) \
== Range(Position(1, 2), Position(3, 4))
assert Range(Position(0, 2), Position(3, 4)) \
!= Range(Position(1, 2), Position(3, 4))
assert Range(Position(0, 2), Position(3, 4)) != 'something else'
assert "1:2-3:4" == repr(Range(Position(1, 2), Position(3, 4)))
def test_position():
assert Position(1, 2) == Position(1, 2)
assert Position(1, 2) != Position(2, 2)
assert Position(1, 2) <= Position(2, 2)
assert Position(2, 2) >= Position(2, 0)
assert Position(1, 2) != 'something else'
assert "1:2" == repr(Position(1, 2))
def test_location():
assert Location(uri="file:///document.txt", range=Range(Position(1, 2), Position(3, 4))) \
== Location(uri="file:///document.txt", range=Range(Position(1, 2), Position(3, 4)))
assert Location(uri="file:///document.txt", range=Range(Position(1, 2), Position(3, 4))) \
!= Location(uri="file:///another.txt", range=Range(Position(1, 2), Position(3, 4)))
assert Location(uri="file:///document.txt", range=Range(Position(1, 2), Position(3, 4))) \
!= 'something else'
assert "file:///document.txt:1:2-3:4" == repr(Location(
uri="file:///document.txt",
range=Range(Position(1, 2), Position(3, 4))))
def test_location():
assert Location(uri="file:///document.txt", range=Range(Position(1, 2), Position(3, 4))) \
== Location(uri="file:///document.txt", range=Range(Position(1, 2), Position(3, 4)))
assert Location(uri="file:///document.txt", range=Range(Position(1, 2), Position(3, 4))) \
!= Location(uri="file:///another.txt", range=Range(Position(1, 2), Position(3, 4)))
assert Location(uri="file:///document.txt", range=Range(Position(1, 2), Position(3, 4))) \
!= 'something else'
assert "file:///document.txt:1:2-3:4" == repr(Location(
uri="file:///document.txt",
range=Range(Position(1, 2), Position(3, 4))))
def test_position():
assert Position(1, 2) == Position(1, 2)
assert Position(1, 2) != Position(2, 2)
assert Position(1, 2) <= Position(2, 2)
assert Position(2, 2) >= Position(2, 0)
assert Position(1, 2) != 'something else'
assert "1:2" == repr(Position(1, 2))