Skip to content

Commit 84982ea

Browse files
committed
Add support for Click 8.5
1 parent 0b0c528 commit 84982ea

3 files changed

Lines changed: 20 additions & 20 deletions

File tree

platformio/dependencies.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def get_pip_dependencies():
2929
core = [
3030
"pip",
3131
"bottle == 0.13.*",
32-
"click >=8.0.4, <8.5, !=8.3", # click 9.0 removes 'protected_args' attribute
32+
"click >=8.0.4, <8.6, !=8.3", # click 9.0 removes 'protected_args' attribute
3333
"colorama",
3434
"marshmallow == 3.*",
3535
"pyelftools >=0.27, <1",

tests/commands/pkg/test_install.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ def test_custom_project_libraries(
440440
)
441441
assert pkgs_to_specs(lm.get_installed()) == [
442442
PackageSpec("ArduinoJson@5.13.4"),
443-
PackageSpec("Nanopb@0.4.91"),
443+
PackageSpec("Nanopb@0.4.92"),
444444
]
445445
assert config.get("env:devkit", "lib_deps") == [
446446
"bblanchon/ArduinoJson@^5",

tests/commands/test_init.py

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ def validate_pioproject(pioproject_dir):
3030
)
3131

3232

33-
def test_init_default(clirunner, validate_cliresult):
34-
with clirunner.isolated_filesystem():
33+
def test_init_default(clirunner, validate_cliresult, tmp_path):
34+
with fs.cd(str(tmp_path)):
3535
result = clirunner.invoke(project_init_cmd)
3636
validate_cliresult(result)
37-
validate_pioproject(os.getcwd())
37+
validate_pioproject(str(tmp_path))
3838

3939

4040
def test_init_duplicated_boards(clirunner, validate_cliresult, tmpdir):
@@ -129,28 +129,28 @@ def test_init_ide_vscode(clirunner, validate_cliresult, tmpdir):
129129
)
130130

131131

132-
def test_init_ide_eclipse(clirunner, validate_cliresult):
133-
with clirunner.isolated_filesystem():
132+
def test_init_ide_eclipse(clirunner, validate_cliresult, tmp_path):
133+
with fs.cd(str(tmp_path)):
134134
result = clirunner.invoke(
135135
project_init_cmd,
136136
["-b", "uno", "--ide", "eclipse", "--no-install-dependencies"],
137137
)
138138
validate_cliresult(result)
139-
validate_pioproject(os.getcwd())
139+
validate_pioproject(str(tmp_path))
140140
assert all(os.path.isfile(f) for f in (".cproject", ".project"))
141141

142142

143-
def test_init_special_board(clirunner, validate_cliresult):
144-
with clirunner.isolated_filesystem():
143+
def test_init_special_board(clirunner, validate_cliresult, tmp_path):
144+
with fs.cd(str(tmp_path)):
145145
result = clirunner.invoke(project_init_cmd, ["-b", "uno"])
146146
validate_cliresult(result)
147-
validate_pioproject(os.getcwd())
147+
validate_pioproject(str(tmp_path))
148148

149149
result = clirunner.invoke(cmd_boards, ["Arduino Uno", "--json-output"])
150150
validate_cliresult(result)
151151
boards = json.loads(result.output)
152152

153-
config = ProjectConfig(os.path.join(os.getcwd(), "platformio.ini"))
153+
config = ProjectConfig(str(tmp_path / "platformio.ini"))
154154
config.validate()
155155

156156
expected_result = dict(
@@ -164,8 +164,8 @@ def test_init_special_board(clirunner, validate_cliresult):
164164
)
165165

166166

167-
def test_init_enable_auto_uploading(clirunner, validate_cliresult):
168-
with clirunner.isolated_filesystem():
167+
def test_init_enable_auto_uploading(clirunner, validate_cliresult, tmp_path):
168+
with fs.cd(str(tmp_path)):
169169
result = clirunner.invoke(
170170
project_init_cmd,
171171
[
@@ -177,8 +177,8 @@ def test_init_enable_auto_uploading(clirunner, validate_cliresult):
177177
],
178178
)
179179
validate_cliresult(result)
180-
validate_pioproject(os.getcwd())
181-
config = ProjectConfig(os.path.join(os.getcwd(), "platformio.ini"))
180+
validate_pioproject(str(tmp_path))
181+
config = ProjectConfig(str(tmp_path / "platformio.ini"))
182182
config.validate()
183183
expected_result = dict(
184184
targets=["upload"], platform="atmelavr", board="uno", framework=["arduino"]
@@ -189,8 +189,8 @@ def test_init_enable_auto_uploading(clirunner, validate_cliresult):
189189
)
190190

191191

192-
def test_init_custom_framework(clirunner, validate_cliresult):
193-
with clirunner.isolated_filesystem():
192+
def test_init_custom_framework(clirunner, validate_cliresult, tmp_path):
193+
with fs.cd(str(tmp_path)):
194194
result = clirunner.invoke(
195195
project_init_cmd,
196196
[
@@ -202,8 +202,8 @@ def test_init_custom_framework(clirunner, validate_cliresult):
202202
],
203203
)
204204
validate_cliresult(result)
205-
validate_pioproject(os.getcwd())
206-
config = ProjectConfig(os.path.join(os.getcwd(), "platformio.ini"))
205+
validate_pioproject(str(tmp_path))
206+
config = ProjectConfig(str(tmp_path / "platformio.ini"))
207207
config.validate()
208208
expected_result = dict(platform="teensy", board="teensy31", framework=["mbed"])
209209
assert config.has_section("env:teensy31")

0 commit comments

Comments
 (0)