Skip to content

Commit d26623e

Browse files
authored
Merge pull request #26 from pimoroni/patch-ci-python-versions
CI: Update Python versions.
2 parents a218cea + a20a054 commit d26623e

File tree

3 files changed

+11
-8
lines changed

3 files changed

+11
-8
lines changed

.github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212
strategy:
1313
matrix:
14-
python: [3.5, 3.6, 3.7, 3.8]
14+
python: [3.7, 3.9]
1515

1616
steps:
1717
- uses: actions/checkout@v2
@@ -33,5 +33,5 @@ jobs:
3333
run: |
3434
python -m pip install coveralls
3535
coveralls --service=github
36-
if: ${{ matrix.python == '3.8' }}
36+
if: ${{ matrix.python == '3.9' }}
3737

library/tests/test_setup.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ def test_moisture_setup(GPIO, smbus):
88
ch2 = Moisture(channel=2)
99
ch3 = Moisture(channel=3)
1010

11-
assert GPIO.setup.has_calls([
11+
GPIO.setup.assert_has_calls([
1212
mock.call(ch1._gpio_pin, GPIO.IN),
1313
mock.call(ch2._gpio_pin, GPIO.IN),
1414
mock.call(ch3._gpio_pin, GPIO.IN)
@@ -34,14 +34,17 @@ def test_pump_setup(GPIO, smbus):
3434
ch2 = Pump(channel=2)
3535
ch3 = Pump(channel=3)
3636

37-
assert GPIO.setup.has_calls([
37+
GPIO.setup.assert_has_calls([
3838
mock.call(ch1._gpio_pin, GPIO.OUT, initial=GPIO.LOW),
3939
mock.call(ch2._gpio_pin, GPIO.OUT, initial=GPIO.LOW),
4040
mock.call(ch3._gpio_pin, GPIO.OUT, initial=GPIO.LOW)
4141
])
4242

43-
assert GPIO.PWM.has_calls([
43+
GPIO.PWM.assert_has_calls([
4444
mock.call(ch1._gpio_pin, PUMP_PWM_FREQ),
45+
mock.call().start(0),
4546
mock.call(ch2._gpio_pin, PUMP_PWM_FREQ),
46-
mock.call(ch3._gpio_pin, PUMP_PWM_FREQ)
47+
mock.call().start(0),
48+
mock.call(ch3._gpio_pin, PUMP_PWM_FREQ),
49+
mock.call().start(0)
4750
])

library/tox.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
[tox]
2-
envlist = py{35,37},qa
2+
envlist = py{37,38,39},qa
33
skip_missing_interpreters = True
44

55
[testenv]
66
commands =
77
python setup.py install
8-
coverage run -m py.test -v -r wsx
8+
coverage run -m pytest -v -r wsx
99
coverage report
1010
deps =
1111
mock

0 commit comments

Comments
 (0)