Skip to content

Commit ab6160e

Browse files
Migrated TestBoardAttachWithoutSketchJson from test_board.py to board_test.go
1 parent bfbed0f commit ab6160e

File tree

2 files changed

+19
-13
lines changed

2 files changed

+19
-13
lines changed

Diff for: internal/integrationtest/board/board_test.go

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

Diff for: test/test_board.py

-13
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)