Update tests for circup.py changes to support --path option.

Update pluggy required version to fix error on python 3.8
This commit is contained in:
Craig Forbes 2021-01-04 16:38:18 -06:00
parent bb4dbbe1ab
commit 0c07ea45ac
2 changed files with 6 additions and 6 deletions

View file

@ -18,7 +18,7 @@ MarkupSafe==1.1.1
more-itertools==7.2.0
packaging==19.1
pkginfo==1.5.0.1
pluggy==0.12.0
pluggy==0.13.1
py==1.8.0
pycodestyle==2.5.0
pyflakes==2.1.1

View file

@ -352,7 +352,7 @@ def test_find_modules():
), mock.patch(
"circup.os.path.isfile", return_value=True
):
result = circup.find_modules()
result = circup.find_modules("")
assert len(result) == 1
assert result[0].name == "adafruit_74hc595"
@ -367,7 +367,7 @@ def test_find_modules_goes_bang():
), mock.patch("circup.click") as mock_click, mock.patch(
"circup.sys.exit"
) as mock_exit:
circup.find_modules()
circup.find_modules("")
assert mock_click.echo.call_count == 1
mock_exit.assert_called_once_with(1)
@ -405,11 +405,11 @@ def test_get_device_versions():
"""
Ensure get_modules is called with the path for the attached device.
"""
with mock.patch("circup.find_device", return_value="CIRCUITPYTHON"), mock.patch(
with mock.patch(
"circup.get_modules", return_value="ok"
) as mock_gm:
assert circup.get_device_versions() == "ok"
mock_gm.assert_called_once_with(os.path.join("CIRCUITPYTHON", "lib"))
assert circup.get_device_versions("TESTDIR") == "ok"
mock_gm.assert_called_once_with(os.path.join("TESTDIR", "lib"))
def test_get_modules_empty_path():