File tree Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Original file line number Diff line number Diff line change 1
1
import os
2
2
import re
3
3
import shutil
4
- from subprocess import PIPE , CalledProcessError , run # nosec B404
4
+ from subprocess import ( # nosec B404
5
+ PIPE ,
6
+ CalledProcessError ,
7
+ check_output ,
8
+ run ,
9
+ )
5
10
from unittest .mock import patch
6
11
7
12
import pytest
@@ -208,16 +213,12 @@ def test_update_rizin(tmp_path):
208
213
download_rizin (target_path )
209
214
210
215
update_rizin (target_path , target_version_tag )
211
- check_commit = run ( # nosec
212
- ["git" , "rev-parse" , "HEAD" ],
213
- stdout = PIPE ,
214
- stderr = PIPE ,
215
- check = True ,
216
+ current_tag = check_output ( # nosec
217
+ ["git" , "describe" , "--tags" ],
216
218
cwd = target_path ,
217
- )
218
- real_commit = check_commit .stdout .strip ().decode ()
219
+ ).decode ()
219
220
220
- assert real_commit == target_version_tag
221
+ assert current_tag == target_version_tag
221
222
assert os .access (
222
223
target_path / "build" / "binrz" / "rizin" / "rizin" , os .F_OK | os .X_OK
223
224
)
You can’t perform that action at this time.
0 commit comments