Skip to content

Commit 8709857

Browse files
Massimiliano Pippimasci
Massimiliano Pippi
authored andcommitted
simplify test code
1 parent 2c25c95 commit 8709857

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

Diff for: test/test_cache.py

+2-10
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,9 @@
1313
# software without disclosing the source code of your own applications. To purchase
1414
# a commercial license, send an email to [email protected].
1515
import os
16-
import platform
1716

1817

19-
def test_cache_clean(run_command):
18+
def test_cache_clean(run_command, data_dir):
2019
"""
2120
Clean the cache under arduino caching file directory which is
2221
"<Arduino configure file path>/staging"
@@ -31,11 +30,4 @@ def test_cache_clean(run_command):
3130
result = run_command("cache clean")
3231
assert result.ok
3332

34-
running_platform = platform.system()
35-
homeDir = os.path.expanduser("~")
36-
if running_platform == "Linux":
37-
assert not (os.path.isdir(homeDir + ".arduino15/staging"))
38-
elif running_platform == "Darwin":
39-
assert not (os.path.isdir(homeDir + "Library/Arduino15/staging"))
40-
elif running_platform == "Windows":
41-
assert not (os.path.isdir(homeDir + "Arduino15/staging"))
33+
assert not os.path.isdir(os.path.join(data_dir, "staging"))

0 commit comments

Comments
 (0)