Skip to content

Commit

Permalink
Fix unit test and remove Python 3.5 check (#1319)
Browse files Browse the repository at this point in the history
* Update test_gpio_control.py

* Update test_gpio_control.py

* Remove Python 3.5 in Actions
  • Loading branch information
s-martin authored Feb 27, 2021
1 parent 5be26c5 commit b5f4b01
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
strategy:
max-parallel: 4
matrix:
python-version: [3.5, 3.6, 3.7]
python-version: [3.6, 3.7, 3.8]

steps:
- uses: actions/checkout@v1
Expand Down
13 changes: 9 additions & 4 deletions components/gpio_control/test/test_gpio_control.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import configparser
import logging

from mock import patch, MagicMock
from components.gpio_control.gpio_control import get_all_devices
from mock import patch, MagicMock
from gpio_control import gpio_control
import function_calls

# def test_functionCallTwoButtonsOnlyBtn2Pressed(btn1Mock, btn2Mock, functionCall1Mock, functionCall2Mock,
# functionCallBothPressedMock):
Expand All @@ -29,6 +30,10 @@
def testMain():
config = configparser.ConfigParser()
config.read('./gpio_settings_test.ini')
devices = get_all_devices(config)
print(devices)

phoniebox_function_calls = function_calls.phoniebox_function_calls()
gpio_controler = gpio_control(phoniebox_function_calls)

devices = gpio_controler.get_all_devices(config)
gpio_controler.print_all_devices()
pass

0 comments on commit b5f4b01

Please sign in to comment.