示例#1
0
 def test___str__(self):
     expect(str(_GpxElem(52, 0))) == """52°00'00"N, 000°00'00"E"""
     expect(str(_GpxElem(52, 0, "name", "desc", 40))) == """name (52°00'00"N, 000°00'00"E @ 40m) [desc]"""
     expect(str(_GpxElem(52, 0, "name", "desc", 40, utils.Timestamp(2008, 7, 25)))) == (
         """name (52°00'00"N, 000°00'00"E @ 40m on """ "2008-07-25T00:00:00+00:00) [desc]"
     )
示例#2
0
 def test___str__(self, args, result):
     assert str(_GpxElem(*args)) == result
示例#3
0
 def test___repr__(self):
     expect(repr(_GpxElem(52, 0))) == "_GpxElem(52.0, 0.0, None, None, None, None)"
     expect(repr(_GpxElem(52, 0, None))) == "_GpxElem(52.0, 0.0, None, None, None, None)"
     expect(_GpxElem(52, 0, "name", "desc")) == "_GpxElem(52.0, 0.0, 'name', 'desc', None, None)"
示例#4
0
 def test___repr__(self, args, result):
     assert repr(_GpxElem(*args)) == result