X-Git-Url: https://git.ayoreis.com/hackapet/Adafruit_Blinka.git/blobdiff_plain/ef1cd7a840c35a78669a131fb6a22e27e39ab7c1..a75b48ca9e7241a0b876258d31efaa907090c2a8:/examples/index.md diff --git a/examples/index.md b/examples/index.md index 0a03af3..184ca33 100644 --- a/examples/index.md +++ b/examples/index.md @@ -37,6 +37,19 @@ from testing import test_module_name test_module_name("testing.universal.digitalio") ``` +Or to take a more involved example of constructing a test suite requiring hardware, +the following should verify I2C communication with a BME280 module. + +```python +import unittest +import testing.universal.i2c +suite = unittest.TestSuite() +suite.addTest(testing.universal.i2c.TestBME280Interactive) +runner = unittest.TestRunner() +runner.run(suite) +``` + + To prove this on a newly-flashed Feather Huzzah running Micropython 1.9.3, it should be possible (on a posix-compliant platform with adafruit_ampy installed) to `cd test/scripts` then run `./upload_feather_huzzah_micropython_put.sh` to