File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change 11import os
2+ import shutil
23from clang_tools .util import check_os , download_file , unpack_file
34
5+ TEST_REPO = "https://github.com/cpp-linter/cpp-linter-action"
6+
47def test_check_os ():
58 system = check_os ()
69 assert system in ("linux" , "windos" , "macosx" )
710
811def test_download_file ():
9- url = "https://github.com/shenxianpeng/shenxianpeng /blob/master/README.md"
12+ url = f" { TEST_REPO } /blob/master/README.md"
1013 file_name = "test_file"
1114 download_file (url , file_name )
1215 assert os .path .exists (file_name )
1316 os .remove (file_name )
1417 assert not os .path .exists (file_name )
1518
1619def test_unpack_file ():
17- url = "https://github.com/shenxianpeng/shenxianpeng/ archive/refs/heads/master.zip "
18- file_name = "test_file.zip "
20+ url = f" { TEST_REPO } / archive/refs/tags/v1.4.4.tar.gz "
21+ file_name = "test_file.tar.gz "
1922 download_file (url , file_name )
2023 status = unpack_file (file_name )
2124 assert status == 0
22- os .remove (file_name )
25+ os .remove (file_name )
26+ shutil .rmtree ("cpp-linter-action-1.4.4" )
You can’t perform that action at this time.
0 commit comments