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.')