Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc8b1d9b

Browse files
committed
feat: Add test for cache clean
1 parent3345c6d commitc8b1d9b

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

‎test/test_cache.py‎

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# This file is part of arduino-cli.
2+
#
3+
# Copyright 2020 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 modify or
12+
# otherwise use the software for commercial activities involving the Arduino
13+
# software without disclosing the source code of your own applications. To purchase
14+
# a commercial license, send an email to license@arduino.cc.
15+
importos
16+
importplatform
17+
18+
19+
deftest_cache_clean(run_command):
20+
"""
21+
Clean the cache under arduino caching file directory which is
22+
"<Arduino configure file path>/staging"
23+
"""
24+
result=run_command("cache clean")
25+
assertresult.ok
26+
27+
# Generate /staging directory
28+
result=run_command("lib list")
29+
assertresult.ok
30+
31+
result=run_command("cache clean")
32+
assertresult.ok
33+
34+
running_platform=platform.system()
35+
homeDir=os.path.expanduser("~")
36+
ifrunning_platform=="Linux":
37+
assertnot (os.path.isdir(homeDir+".arduino15/staging"))
38+
elifrunning_platform=="Darwin":
39+
assertnot (os.path.isdir(homeDir+"Library/Arduino15/staging"))
40+
elifrunning_platform=="Windows":
41+
assertnot (os.path.isdir(homeDir+"Arduino15/staging"))

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp