コード例 #1
0
 def test_read_only(self):
     r = GPSCoordinate(62, 58, 2, 'W')
     try:
         r.degrees = 5
     except AttributeError:
         pass
     else:
         self.fail('Degrees is not read-only.')
     try:
         r.minutes = 5
     except AttributeError:
         pass
     else:
         self.fail('Minutes is not read-only.')
     try:
         r.seconds = 5
     except AttributeError:
         pass
     else:
         self.fail('Seconds is not read-only.')
     try:
         r.direction = 'S'
     except AttributeError:
         pass
     else:
         self.fail('Direction is not read-only.')
コード例 #2
0
ファイル: gps_coordinate.py プロジェクト: AbdealiJK/pyexiv2
 def test_read_only(self):
     r = GPSCoordinate(62, 58, 2, 'W')
     try:
         r.degrees = 5
     except AttributeError:
         pass
     else:
         self.fail('Degrees is not read-only.')
     try:
         r.minutes = 5
     except AttributeError:
         pass
     else:
         self.fail('Minutes is not read-only.')
     try:
         r.seconds = 5
     except AttributeError:
         pass
     else:
         self.fail('Seconds is not read-only.')
     try:
         r.direction = 'S'
     except AttributeError:
         pass
     else:
         self.fail('Direction is not read-only.')