Skip to content

Commit bd6b4ca

Browse files
Migrated TestCompileWithoutFqbn from test_compile_part_1.py to compile_part_1_test.go
1 parent 736608f commit bd6b4ca

File tree

2 files changed

+40
-12
lines changed

2 files changed

+40
-12
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
// This file is part of arduino-cli.
2+
//
3+
// Copyright 2022 ARDUINO SA (http://www.arduino.cc/)
4+
//
5+
// This software is released under the GNU General Public License version 3,
6+
// which covers the main part of arduino-cli.
7+
// The terms of this license can be found at:
8+
// https://www.gnu.org/licenses/gpl-3.0.en.html
9+
//
10+
// You can be released from the requirements of the above licenses by purchasing
11+
// a commercial license. Buying such a license is mandatory if you want to
12+
// modify or otherwise use the software for commercial activities involving the
13+
// Arduino software without disclosing the source code of your own applications.
14+
// To purchase a commercial license, send an email to license@arduino.cc.
15+
16+
package compile_part_1_test
17+
18+
import (
19+
"testing"
20+
21+
"github.com/arduino/arduino-cli/internal/integrationtest"
22+
"github.com/stretchr/testify/require"
23+
)
24+
25+
func TestCompileWithoutFqbn(t *testing.T) {
26+
env, cli := integrationtest.CreateArduinoCLIWithEnvironment(t)
27+
defer env.CleanUp()
28+
29+
// Init the environment explicitly
30+
_, _, err := cli.Run("core", "update-index")
31+
require.NoError(t, err)
32+
33+
// Install Arduino AVR Boards
34+
_, _, err = cli.Run("core", "install", "arduino:avr@1.8.3")
35+
require.NoError(t, err)
36+
37+
// Build sketch without FQBN
38+
_, _, err = cli.Run("compile")
39+
require.Error(t, err)
40+
}

test/test_compile_part_1.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,6 @@
2525
from .common import running_on_ci
2626

2727

28-
def test_compile_without_fqbn(run_command):
29-
# Init the environment explicitly
30-
run_command(["core", "update-index"])
31-
32-
# Install Arduino AVR Boards
33-
run_command(["core", "install", "arduino:avr@1.8.3"])
34-
35-
# Build sketch without FQBN
36-
result = run_command(["compile"])
37-
assert result.failed
38-
39-
4028
def test_compile_error_message(run_command, working_dir):
4129
# Init the environment explicitly
4230
run_command(["core", "update-index"])

0 commit comments

Comments
 (0)