Skip to content

Commit 7b3a913

Browse files
Migrated TestConfigCompletion from test_completion.py to completion_test.go
1 parent b16fd2f commit 7b3a913

File tree

2 files changed

+15
-12
lines changed

2 files changed

+15
-12
lines changed

internal/integrationtest/completion/completion_test.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,3 +141,18 @@ func TestStaticCompletions(t *testing.T) {
141141
stdout, _, _ = cli.Run("__complete", "--log-level", "")
142142
require.Contains(t, string(stdout), "trace")
143143
}
144+
145+
// here we test if the completions coming from the core are working
146+
func TestConfigCompletion(t *testing.T) {
147+
env, cli := integrationtest.CreateArduinoCLIWithEnvironment(t)
148+
defer env.CleanUp()
149+
150+
stdout, _, _ := cli.Run("__complete", "config", "add", "")
151+
require.Contains(t, string(stdout), "board_manager.additional_urls")
152+
stdout, _, _ = cli.Run("__complete", "config", "remove", "")
153+
require.Contains(t, string(stdout), "board_manager.additional_urls")
154+
stdout, _, _ = cli.Run("__complete", "config", "delete", "")
155+
require.Contains(t, string(stdout), "board_manager.additional_urls")
156+
stdout, _, _ = cli.Run("__complete", "config", "set", "")
157+
require.Contains(t, string(stdout), "board_manager.additional_urls")
158+
}

test/test_completion.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,6 @@
1414
# a commercial license, send an email to license@arduino.cc.
1515

1616

17-
# here we test if the completions coming from the core are working
18-
def test_config_completion(run_command):
19-
result = run_command(["__complete", "config", "add", ""])
20-
assert "board_manager.additional_urls" in result.stdout
21-
result = run_command(["__complete", "config", "remove", ""])
22-
assert "board_manager.additional_urls" in result.stdout
23-
result = run_command(["__complete", "config", "delete", ""])
24-
assert "board_manager.additional_urls" in result.stdout
25-
result = run_command(["__complete", "config", "set", ""])
26-
assert "board_manager.additional_urls" in result.stdout
27-
28-
2917
# here we test if the completions coming from the libs are working
3018
def test_lib_completion(run_command):
3119
assert run_command(["lib", "update-index"])

0 commit comments

Comments
 (0)