(connpath)
| 8 | |
| 9 | @with_sitl |
| 10 | def test_mavlink(connpath): |
| 11 | vehicle = connect(connpath) |
| 12 | out = MAVConnection('udpin:localhost:15668') |
| 13 | vehicle._handler.pipe(out) |
| 14 | out.start() |
| 15 | |
| 16 | vehicle2 = connect('udpout:localhost:15668') |
| 17 | |
| 18 | result = {'success': False} |
| 19 | |
| 20 | @vehicle2.on_attribute('location') |
| 21 | def callback(*args): |
| 22 | result['success'] = True |
| 23 | |
| 24 | i = 20 |
| 25 | while not result['success'] and i > 0: |
| 26 | time.sleep(1) |
| 27 | |
| 28 | assert result['success'] |
nothing calls this directly
no test coverage detected