Skip to content

Commit 55dde2d

Browse files
Migrated TestBoardAttachWithoutSketchJson from test_board.py to board_test.go
1 parent 9c80956 commit 55dde2d

File tree

2 files changed

+19
-13
lines changed

2 files changed

+19
-13
lines changed

internal/integrationtest/board/board_test.go

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -429,3 +429,22 @@ func TestBoardSearch(t *testing.T) {
429429
}
430430
]`)
431431
}
432+
433+
func TestBoardAttachWithoutSketchJson(t *testing.T) {
434+
env, cli := integrationtest.CreateArduinoCLIWithEnvironment(t)
435+
defer env.CleanUp()
436+
437+
_, _, err := cli.Run("update")
438+
require.NoError(t, err)
439+
440+
sketchName := "BoardAttachWithoutSketchJson"
441+
sketchPath := cli.SketchbookDir().Join(sketchName)
442+
fqbn := "arduino:avr:uno"
443+
444+
// Create a test sketch
445+
_, _, err = cli.Run("sketch", "new", sketchPath.String())
446+
require.NoError(t, err)
447+
448+
_, _, err = cli.Run("board", "attach", "-b", fqbn, sketchPath.String())
449+
require.NoError(t, err)
450+
}

test/test_board.py

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,6 @@
2323
from .common import running_on_ci
2424

2525

26-
def test_board_attach_without_sketch_json(run_command, data_dir):
27-
run_command(["update"])
28-
29-
sketch_name = "BoardAttachWithoutSketchJson"
30-
sketch_path = Path(data_dir, sketch_name)
31-
fqbn = "arduino:avr:uno"
32-
33-
# Create a test sketch
34-
assert run_command(["sketch", "new", sketch_path])
35-
36-
assert run_command(["board", "attach", "-b", fqbn, sketch_path])
37-
38-
3926
def test_board_search_with_outdated_core(run_command):
4027
assert run_command(["update"])
4128

0 commit comments

Comments
 (0)