circfirm 5.1.0__tar.gz → 5.1.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {circfirm-5.1.0 → circfirm-5.1.1}/PKG-INFO +1 -1
- circfirm-5.1.1/VERSION +1 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/circfirm/cli/__init__.py +4 -2
- {circfirm-5.1.0 → circfirm-5.1.1}/circfirm.egg-info/PKG-INFO +1 -1
- {circfirm-5.1.0 → circfirm-5.1.1}/circfirm.egg-info/SOURCES.txt +1 -0
- circfirm-5.1.1/tests/cli/test_cli.py +72 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/tests/cli/test_cli_cache.py +1 -1
- {circfirm-5.1.0 → circfirm-5.1.1}/tests/cli/test_cli_query.py +3 -5
- {circfirm-5.1.0 → circfirm-5.1.1}/tests/cli/test_cli_update.py +1 -3
- {circfirm-5.1.0 → circfirm-5.1.1}/tests/conftest.py +5 -11
- {circfirm-5.1.0 → circfirm-5.1.1}/tests/helpers.py +3 -3
- circfirm-5.1.0/VERSION +0 -1
- {circfirm-5.1.0 → circfirm-5.1.1}/.github/dependabot.yml +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/.github/workflows/codeql.yml +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/.github/workflows/publish.yml +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/.github/workflows/push.yml +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/.gitignore +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/.pre-commit-config.yaml +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/.readthedocs.yaml +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/.reuse/dep5 +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/LICENSE +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/LICENSES/MIT.txt +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/LICENSES/Unlicense.txt +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/Makefile +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/NOTICE +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/NOTICE.license +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/README.rst +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/VERSION.license +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/circfirm/__init__.py +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/circfirm/backend/__init__.py +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/circfirm/backend/cache.py +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/circfirm/backend/device.py +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/circfirm/backend/github.py +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/circfirm/backend/s3.py +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/circfirm/cli/about.py +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/circfirm/cli/cache.py +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/circfirm/cli/config.py +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/circfirm/cli/current.py +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/circfirm/cli/detect.py +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/circfirm/cli/install.py +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/circfirm/cli/query.py +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/circfirm/cli/update.py +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/circfirm/py.typed +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/circfirm/startup.py +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/circfirm/templates/settings.yaml +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/circfirm/templates/settings.yaml.license +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/circfirm.egg-info/dependency_links.txt +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/circfirm.egg-info/entry_points.txt +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/circfirm.egg-info/requires.txt +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/circfirm.egg-info/top_level.txt +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/docs/commands/cache.rst +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/docs/commands/config.rst +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/docs/commands/current.rst +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/docs/commands/detect.rst +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/docs/commands/install.rst +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/docs/commands/query.rst +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/docs/commands/update.rst +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/docs/conf.py +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/docs/examples/update_many.rst +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/docs/examples/weekly_cache.rst +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/docs/index.rst +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/docs/index.rst.license +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/docs/infrastructure/ci.rst +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/docs/infrastructure/codecheck.rst +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/docs/infrastructure/docs.rst +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/docs/infrastructure/license.rst +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/docs/infrastructure/notice.rst +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/docs/infrastructure/tests.rst +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/examples/bash/update_many.sh +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/examples/bash/weekly_cache.sh +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/examples/powershell/update_many.ps1 +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/examples/powershell/weekly_cache.ps1 +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/pyproject.toml +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/scripts/rmdir.py +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/setup.cfg +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/tests/assets/boot_out.txt +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/tests/assets/firmwares/feather_m0_express/adafruit-circuitpython-feather_m0_express-en_US-7.0.0.uf2 +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/tests/assets/firmwares/feather_m0_express/adafruit-circuitpython-feather_m0_express-en_US-7.1.0.uf2 +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/tests/assets/firmwares/feather_m0_express/adafruit-circuitpython-feather_m0_express-en_US-7.2.0.uf2 +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/tests/assets/firmwares/feather_m0_express/adafruit-circuitpython-feather_m0_express-fr-7.0.0.uf2 +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/tests/assets/firmwares/feather_m0_express/adafruit-circuitpython-feather_m0_express-fr-7.1.0.uf2 +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/tests/assets/firmwares/feather_m0_express/adafruit-circuitpython-feather_m0_express-fr-7.2.0.uf2 +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/tests/assets/firmwares/feather_m0_express/adafruit-circuitpython-feather_m0_express-zh_Latn_pinyin-7.0.0.uf2 +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/tests/assets/firmwares/feather_m0_express/adafruit-circuitpython-feather_m0_express-zh_Latn_pinyin-7.1.0.uf2 +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/tests/assets/firmwares/feather_m0_express/adafruit-circuitpython-feather_m0_express-zh_Latn_pinyin-7.2.0.uf2 +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/tests/assets/firmwares/feather_m4_express/adafruit-circuitpython-feather_m4_express-en_US-7.0.0.uf2 +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/tests/assets/firmwares/feather_m4_express/adafruit-circuitpython-feather_m4_express-en_US-7.1.0.uf2 +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/tests/assets/firmwares/feather_m4_express/adafruit-circuitpython-feather_m4_express-en_US-7.2.0.uf2 +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/tests/assets/firmwares/feather_m4_express/adafruit-circuitpython-feather_m4_express-fr-7.0.0.uf2 +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/tests/assets/firmwares/feather_m4_express/adafruit-circuitpython-feather_m4_express-fr-7.1.0.uf2 +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/tests/assets/firmwares/feather_m4_express/adafruit-circuitpython-feather_m4_express-fr-7.2.0.uf2 +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/tests/assets/firmwares/feather_m4_express/adafruit-circuitpython-feather_m4_express-zh_Latn_pinyin-7.0.0.uf2 +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/tests/assets/firmwares/feather_m4_express/adafruit-circuitpython-feather_m4_express-zh_Latn_pinyin-7.1.0.uf2 +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/tests/assets/firmwares/feather_m4_express/adafruit-circuitpython-feather_m4_express-zh_Latn_pinyin-7.2.0.uf2 +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/tests/assets/firmwares/pygamer/adafruit-circuitpython-pygamer-en_US-7.0.0.uf2 +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/tests/assets/firmwares/pygamer/adafruit-circuitpython-pygamer-en_US-7.1.0.uf2 +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/tests/assets/firmwares/pygamer/adafruit-circuitpython-pygamer-en_US-7.2.0.uf2 +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/tests/assets/firmwares/pygamer/adafruit-circuitpython-pygamer-fr-7.0.0.uf2 +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/tests/assets/firmwares/pygamer/adafruit-circuitpython-pygamer-fr-7.1.0.uf2 +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/tests/assets/firmwares/pygamer/adafruit-circuitpython-pygamer-fr-7.2.0.uf2 +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/tests/assets/firmwares/pygamer/adafruit-circuitpython-pygamer-zh_Latn_pinyin-7.0.0.uf2 +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/tests/assets/firmwares/pygamer/adafruit-circuitpython-pygamer-zh_Latn_pinyin-7.1.0.uf2 +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/tests/assets/firmwares/pygamer/adafruit-circuitpython-pygamer-zh_Latn_pinyin-7.2.0.uf2 +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/tests/assets/info_uf2.txt +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/tests/assets/responses/full_list.txt +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/tests/assets/responses/full_list.txt.license +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/tests/assets/responses/specific_board.txt +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/tests/assets/responses/specific_board.txt.license +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/tests/backend/test_backend.py +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/tests/backend/test_backend_cache.py +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/tests/backend/test_backend_device.py +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/tests/backend/test_backend_github.py +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/tests/backend/test_backend_s3.py +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/tests/cli/test_cli_about.py +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/tests/cli/test_cli_config.py +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/tests/cli/test_cli_current.py +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/tests/cli/test_cli_detect.py +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/tests/cli/test_cli_install.py +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/tests/test_startup.py +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/uv.lock +0 -0
- {circfirm-5.1.0 → circfirm-5.1.1}/uv.lock.license +0 -0
circfirm-5.1.1/VERSION
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
5.1.1
|
|
@@ -17,6 +17,7 @@ from typing import Any, TypeVar
|
|
|
17
17
|
|
|
18
18
|
import click
|
|
19
19
|
import click_spinner
|
|
20
|
+
import requests
|
|
20
21
|
import yaml
|
|
21
22
|
|
|
22
23
|
import circfirm
|
|
@@ -103,9 +104,10 @@ def download_if_needed(board: str, version: str, language: str) -> None:
|
|
|
103
104
|
circfirm.backend.cache.download_uf2,
|
|
104
105
|
args=(board, version, language),
|
|
105
106
|
)
|
|
106
|
-
except ConnectionError as err:
|
|
107
|
+
except (ConnectionError, requests.exceptions.ConnectionError) as err:
|
|
107
108
|
click.echo(" failed") # Mark as failed
|
|
108
|
-
|
|
109
|
+
if isinstance(err, ConnectionError):
|
|
110
|
+
click.echo(f"Error: {err.args[0]}")
|
|
109
111
|
sys.exit(4)
|
|
110
112
|
else:
|
|
111
113
|
click.echo("Using cached firmware file")
|
|
@@ -107,6 +107,7 @@ tests/backend/test_backend_cache.py
|
|
|
107
107
|
tests/backend/test_backend_device.py
|
|
108
108
|
tests/backend/test_backend_github.py
|
|
109
109
|
tests/backend/test_backend_s3.py
|
|
110
|
+
tests/cli/test_cli.py
|
|
110
111
|
tests/cli/test_cli_about.py
|
|
111
112
|
tests/cli/test_cli_cache.py
|
|
112
113
|
tests/cli/test_cli_config.py
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# SPDX-FileCopyrightText: 2026 Alec Delaney
|
|
2
|
+
# SPDX-License-Identifier: MIT
|
|
3
|
+
|
|
4
|
+
"""Tests the core CLI functionality.
|
|
5
|
+
|
|
6
|
+
Author(s): Alec Delaney
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
import shutil
|
|
10
|
+
from typing import NoReturn
|
|
11
|
+
|
|
12
|
+
import pytest
|
|
13
|
+
|
|
14
|
+
import circfirm.backend.cache
|
|
15
|
+
import circfirm.cli
|
|
16
|
+
|
|
17
|
+
BOARD = "feather_m0_express"
|
|
18
|
+
LANGUAGE = "cs"
|
|
19
|
+
VERSION = "6.1.0"
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
@pytest.mark.parametrize(
|
|
23
|
+
"cached",
|
|
24
|
+
(
|
|
25
|
+
(True,),
|
|
26
|
+
(False,),
|
|
27
|
+
),
|
|
28
|
+
)
|
|
29
|
+
def test_download_if_needed_cached(
|
|
30
|
+
monkeypatch: pytest.MonkeyPatch,
|
|
31
|
+
cached: bool,
|
|
32
|
+
) -> None:
|
|
33
|
+
"""Tests the install command when there is a cached firmware and has internet."""
|
|
34
|
+
monkeypatch.setattr(
|
|
35
|
+
circfirm.backend.cache, "is_downloaded", lambda _x, _y, _z: cached
|
|
36
|
+
)
|
|
37
|
+
try:
|
|
38
|
+
circfirm.cli.download_if_needed(BOARD, VERSION, LANGUAGE)
|
|
39
|
+
finally:
|
|
40
|
+
board_folder = circfirm.backend.cache.get_board_folder(BOARD)
|
|
41
|
+
if board_folder.exists(): # pragma: no cover
|
|
42
|
+
shutil.rmtree(board_folder)
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
@pytest.mark.parametrize(
|
|
46
|
+
"cached,succeeds",
|
|
47
|
+
(
|
|
48
|
+
(True, True),
|
|
49
|
+
(False, False),
|
|
50
|
+
),
|
|
51
|
+
)
|
|
52
|
+
def test_download_if_needed_cached_no_internet(
|
|
53
|
+
monkeypatch: pytest.MonkeyPatch,
|
|
54
|
+
mock_no_internet: NoReturn,
|
|
55
|
+
cached: bool,
|
|
56
|
+
succeeds: bool,
|
|
57
|
+
) -> None:
|
|
58
|
+
"""Tests the install command when there is a cached firmware but no internet."""
|
|
59
|
+
monkeypatch.setattr(
|
|
60
|
+
circfirm.backend.cache, "is_downloaded", lambda _x, _y, _z: cached
|
|
61
|
+
)
|
|
62
|
+
|
|
63
|
+
try:
|
|
64
|
+
if succeeds:
|
|
65
|
+
circfirm.cli.download_if_needed(BOARD, VERSION, LANGUAGE)
|
|
66
|
+
else:
|
|
67
|
+
with pytest.raises(SystemExit):
|
|
68
|
+
circfirm.cli.download_if_needed(BOARD, VERSION, LANGUAGE)
|
|
69
|
+
finally:
|
|
70
|
+
board_folder = circfirm.backend.cache.get_board_folder(BOARD)
|
|
71
|
+
if board_folder.exists(): # pragma: no cover
|
|
72
|
+
shutil.rmtree(board_folder)
|
|
@@ -273,7 +273,7 @@ def test_cache_latest() -> None:
|
|
|
273
273
|
shutil.rmtree(board_folder)
|
|
274
274
|
|
|
275
275
|
|
|
276
|
-
def test_cache_latest_no_internet(
|
|
276
|
+
def test_cache_latest_no_internet(mock_no_internet: NoReturn) -> None:
|
|
277
277
|
"""Test the update command when in CIRCUITPY mode when there is no internet connection."""
|
|
278
278
|
board = "feather_m0_express"
|
|
279
279
|
language = "cs"
|
|
@@ -69,9 +69,7 @@ def test_query_board_ids_bad_token(token: None) -> None:
|
|
|
69
69
|
assert result.exit_code != 0
|
|
70
70
|
|
|
71
71
|
|
|
72
|
-
def test_query_board_ids_no_internet(
|
|
73
|
-
token: None, mock_requests_no_internet: NoReturn
|
|
74
|
-
) -> None:
|
|
72
|
+
def test_query_board_ids_no_internet(token: None, mock_no_internet: NoReturn) -> None:
|
|
75
73
|
"""Tests failure when cannot fetch results due to no network connection."""
|
|
76
74
|
result = RUNNER.invoke(cli, ["query", "board-ids"])
|
|
77
75
|
assert result.exit_code != 0
|
|
@@ -124,7 +122,7 @@ def test_query_versions() -> None:
|
|
|
124
122
|
assert result.output == "6.2.0-beta.1\n"
|
|
125
123
|
|
|
126
124
|
|
|
127
|
-
def test_query_versions_no_internet(
|
|
125
|
+
def test_query_versions_no_internet(mock_no_internet: NoReturn) -> None:
|
|
128
126
|
"""Tests the ability to query firmware versions using the CLI."""
|
|
129
127
|
board = "adafruit_feather_rp2040"
|
|
130
128
|
language = "cs"
|
|
@@ -180,7 +178,7 @@ def test_query_latest() -> None:
|
|
|
180
178
|
assert result.output == expected_output
|
|
181
179
|
|
|
182
180
|
|
|
183
|
-
def test_query_latest_no_internet(
|
|
181
|
+
def test_query_latest_no_internet(mock_no_internet: NoReturn) -> None:
|
|
184
182
|
"""Tests the ability to query the latest version of the firmware using the CLI."""
|
|
185
183
|
board = "adafruit_feather_rp2040"
|
|
186
184
|
language = "cs"
|
|
@@ -46,9 +46,7 @@ def test_update(mock_with_circuitpy: None) -> None:
|
|
|
46
46
|
shutil.rmtree(board_folder)
|
|
47
47
|
|
|
48
48
|
|
|
49
|
-
def test_update_no_internet(
|
|
50
|
-
mock_s3_no_internet: None, mock_with_circuitpy: None
|
|
51
|
-
) -> None:
|
|
49
|
+
def test_update_no_internet(mock_no_internet: None, mock_with_circuitpy: None) -> None:
|
|
52
50
|
"""Test the update command when in CIRCUITPY mode."""
|
|
53
51
|
try:
|
|
54
52
|
tests.helpers.set_firmware_version(ORIGINAL_VERSION)
|
|
@@ -120,25 +120,19 @@ def mock_with_firmwares_archived() -> Iterator[None]:
|
|
|
120
120
|
|
|
121
121
|
|
|
122
122
|
@pytest.fixture
|
|
123
|
-
def
|
|
123
|
+
def mock_no_internet(monkeypatch: pytest.MonkeyPatch) -> NoReturn:
|
|
124
124
|
"""Simulate a network error by raising requests.ConnectionError."""
|
|
125
125
|
|
|
126
|
-
def
|
|
126
|
+
def mock_requests_get(*args, **kwargs) -> NoReturn:
|
|
127
127
|
"""Mock GET function."""
|
|
128
128
|
raise requests.ConnectionError
|
|
129
129
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
@pytest.fixture
|
|
134
|
-
def mock_s3_no_internet(monkeypatch: pytest.MonkeyPatch) -> None:
|
|
135
|
-
"""Monkeypatch for an S3 command run without an internet connection."""
|
|
136
|
-
|
|
137
|
-
def mock_send(self, *args, **kwargs) -> NoReturn:
|
|
130
|
+
def mock_urllib3session_send(self, *args, **kwargs) -> NoReturn:
|
|
138
131
|
"""Mock send method."""
|
|
139
132
|
raise botocore.exceptions.EndpointConnectionError(endpoint_url="test")
|
|
140
133
|
|
|
141
|
-
monkeypatch.setattr(
|
|
134
|
+
monkeypatch.setattr(requests, "get", mock_requests_get)
|
|
135
|
+
monkeypatch.setattr(URLLib3Session, "send", mock_urllib3session_send)
|
|
142
136
|
|
|
143
137
|
|
|
144
138
|
# Fixtures for working with GitHub tokens in settings file
|
|
@@ -71,9 +71,9 @@ def delete_mount_node(path: str, missing_ok: bool = False) -> None:
|
|
|
71
71
|
|
|
72
72
|
def _copy_text_file(filename: str) -> None:
|
|
73
73
|
"""Copy a text file to the mounted test drive."""
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
shutil.copyfile(
|
|
74
|
+
template_file = os.path.join("tests", "assets", filename)
|
|
75
|
+
mount_dest = os.path.join(get_mount(), filename)
|
|
76
|
+
shutil.copyfile(template_file, mount_dest)
|
|
77
77
|
|
|
78
78
|
|
|
79
79
|
def copy_uf2_info() -> None:
|
circfirm-5.1.0/VERSION
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
5.1.0
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|