X-Git-Url: https://git.ayoreis.com/Adafruit_Blinka-hackapet.git/blobdiff_plain/38566e3a72507341517804c374e71e3bd4c82934..refs/heads/micropython-pyi:/test/src/testing/universal/uart.py diff --git a/test/src/testing/universal/uart.py b/test/src/testing/universal/uart.py index 05a917f..74a9b45 100644 --- a/test/src/testing/universal/uart.py +++ b/test/src/testing/universal/uart.py @@ -1,20 +1,27 @@ +# SPDX-FileCopyrightText: 2021 Melissa LeBlanc-Williams for Adafruit Industries +# +# SPDX-License-Identifier: MIT import gc from unittest import TestCase from testing import await_true + gc.collect() class TestGPSInteractive(TestCase): - def test_read_value(self): import adafruit_blinka - adafruit_blinka.patch_system() # needed before adafruit_gps imports time + + adafruit_blinka.patch_system() # needed before adafruit_gps imports time import microcontroller.pin + gc.collect() import busio + gc.collect() import adafruit_gps + gc.collect() # configure the last available UART (first uart often for REPL) @@ -23,8 +30,8 @@ class TestGPSInteractive(TestCase): gps = adafruit_gps.GPS(uart) - gps.send_command('PMTK314,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0') - gps.send_command('PMTK220,1000') + gps.send_command("PMTK314,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0") + gps.send_command("PMTK220,1000") def try_fix(): gps.update() @@ -35,4 +42,3 @@ class TestGPSInteractive(TestCase): self.assertTrue(gps.satellites is not None) self.assertTrue(-90 <= gps.latitude < 90) self.assertTrue(-180 <= gps.longitude < 180) -