Merge pull request #26 from pimoroni/patch-ci-python-versions

CI: Update Python versions.
This commit is contained in:
Philip Howard
2023-01-19 16:20:06 +00:00
committed by GitHub
3 changed files with 11 additions and 8 deletions

View File

@@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python: [3.5, 3.6, 3.7, 3.8]
python: [3.7, 3.9]
steps:
- uses: actions/checkout@v2
@@ -33,5 +33,5 @@ jobs:
run: |
python -m pip install coveralls
coveralls --service=github
if: ${{ matrix.python == '3.8' }}
if: ${{ matrix.python == '3.9' }}

View File

@@ -8,7 +8,7 @@ def test_moisture_setup(GPIO, smbus):
ch2 = Moisture(channel=2)
ch3 = Moisture(channel=3)
assert GPIO.setup.has_calls([
GPIO.setup.assert_has_calls([
mock.call(ch1._gpio_pin, GPIO.IN),
mock.call(ch2._gpio_pin, GPIO.IN),
mock.call(ch3._gpio_pin, GPIO.IN)
@@ -34,14 +34,17 @@ def test_pump_setup(GPIO, smbus):
ch2 = Pump(channel=2)
ch3 = Pump(channel=3)
assert GPIO.setup.has_calls([
GPIO.setup.assert_has_calls([
mock.call(ch1._gpio_pin, GPIO.OUT, initial=GPIO.LOW),
mock.call(ch2._gpio_pin, GPIO.OUT, initial=GPIO.LOW),
mock.call(ch3._gpio_pin, GPIO.OUT, initial=GPIO.LOW)
])
assert GPIO.PWM.has_calls([
GPIO.PWM.assert_has_calls([
mock.call(ch1._gpio_pin, PUMP_PWM_FREQ),
mock.call().start(0),
mock.call(ch2._gpio_pin, PUMP_PWM_FREQ),
mock.call(ch3._gpio_pin, PUMP_PWM_FREQ)
mock.call().start(0),
mock.call(ch3._gpio_pin, PUMP_PWM_FREQ),
mock.call().start(0)
])

View File

@@ -1,11 +1,11 @@
[tox]
envlist = py{35,37},qa
envlist = py{37,38,39},qa
skip_missing_interpreters = True
[testenv]
commands =
python setup.py install
coverage run -m py.test -v -r wsx
coverage run -m pytest -v -r wsx
coverage report
deps =
mock