Skip to content

Commit 6d8517d

Browse files
committed
Added tests
1 parent ef08f64 commit 6d8517d

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

test/test_core.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,14 @@ def test_core_install(run_command):
265265
assert result.ok
266266
assert _in(result.stdout, "arduino:avr", "1.6.16")
267267

268-
# Replace it with a more recent one
268+
# Replace it with the same with --no-overwrite (should NOT fail)
269+
assert run_command(["core", "install", "arduino:[email protected]", "--no-overwrite"])
270+
271+
# Replace it with a more recent one with --no-overwrite (should fail)
272+
result = run_command(["core", "install", "arduino:[email protected]", "--no-overwrite"])
273+
assert result.failed
274+
275+
# Replace it with a more recent one without --no-overwrite (should succeed)
269276
assert run_command(["core", "install", "arduino:[email protected]"])
270277
result = run_command(["core", "list", "--format", "json"])
271278
assert result.ok

0 commit comments

Comments
 (0)