Skip to content

Commit fc1f3d8

Browse files
Migrate TestLibOpsCaseInsensitive from test_lib.py to lib_test.go
1 parent bf6c67d commit fc1f3d8

File tree

2 files changed

+28
-24
lines changed

2 files changed

+28
-24
lines changed

internal/integrationtest/lib/lib_test.go

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -690,3 +690,31 @@ func TestUninstallSpaces(t *testing.T) {
690690
require.NoError(t, err)
691691
requirejson.Len(t, stdout, 0)
692692
}
693+
694+
func TestLibOpsCaseInsensitive(t *testing.T) {
695+
/*This test is supposed to (un)install the following library,
696+
As you can see the name is all caps:
697+
698+
Name: "PCM"
699+
Author: David Mellis <d.mellis@bcmi-labs.cc>, Michael Smith <michael@hurts.ca>
700+
Maintainer: David Mellis <d.mellis@bcmi-labs.cc>
701+
Sentence: Playback of short audio samples.
702+
Paragraph: These samples are encoded directly in the Arduino sketch as an array of numbers.
703+
Website: http://highlowtech.org/?p=1963
704+
Category: Signal Input/Output
705+
Architecture: avr
706+
Types: Contributed
707+
Versions: [1.0.0]*/
708+
709+
env, cli := integrationtest.CreateArduinoCLIWithEnvironment(t)
710+
defer env.CleanUp()
711+
712+
key := "pcm"
713+
_, _, err := cli.Run("lib", "install", key)
714+
require.NoError(t, err)
715+
_, _, err = cli.Run("lib", "uninstall", key)
716+
require.NoError(t, err)
717+
stdout, _, err := cli.Run("lib", "list", "--format", "json")
718+
require.NoError(t, err)
719+
requirejson.Len(t, stdout, 0)
720+
}

test/test_lib.py

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -146,30 +146,6 @@ def test_install_with_zip_path(run_command, data_dir, downloads_dir):
146146
assert lib_install_dir / "README.adoc" in files
147147

148148

149-
def test_lib_ops_caseinsensitive(run_command):
150-
"""
151-
This test is supposed to (un)install the following library,
152-
As you can see the name is all caps:
153-
154-
Name: "PCM"
155-
Author: David Mellis <d.mellis@bcmi-labs.cc>, Michael Smith <michael@hurts.ca>
156-
Maintainer: David Mellis <d.mellis@bcmi-labs.cc>
157-
Sentence: Playback of short audio samples.
158-
Paragraph: These samples are encoded directly in the Arduino sketch as an array of numbers.
159-
Website: http://highlowtech.org/?p=1963
160-
Category: Signal Input/Output
161-
Architecture: avr
162-
Types: Contributed
163-
Versions: [1.0.0]
164-
"""
165-
key = "pcm"
166-
assert run_command(["lib", "install", key])
167-
assert run_command(["lib", "uninstall", key])
168-
result = run_command(["lib", "list", "--format", "json"])
169-
assert result.ok
170-
assert len(json.loads(result.stdout)) == 0
171-
172-
173149
def test_search(run_command):
174150
assert run_command(["update"])
175151

0 commit comments

Comments
 (0)