File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -4,4 +4,4 @@ filterwarnings =
4
4
ignore::DeprecationWarning
5
5
ignore::ResourceWarning
6
6
7
- addopts = -s --verbose
7
+ addopts = -s --verbose -- tb =short
Original file line number Diff line number Diff line change 3
3
import json
4
4
import pytest
5
5
import semver
6
+ from datetime import datetime
6
7
7
8
this_test_path = os .path .dirname (os .path .realpath (__file__ ))
8
9
# Calculate absolute path of the CLI
@@ -95,8 +96,8 @@ def test_command_version():
95
96
result = run_command ('version --format json' )
96
97
parsed_out = json .loads (result .stdout )
97
98
98
- assert parsed_out .get ('command ' , False ) == 'arduino-cli'
99
- assert isinstance (semver .parse (parsed_out .get ('version ' , False )), dict )
100
- assert isinstance (parsed_out .get ('commit ' , False ), str )
101
- assert parsed_out .get ('build_date' , False )
99
+ assert parsed_out .get ('Application ' , False ) == 'arduino-cli'
100
+ assert isinstance (semver .parse (parsed_out .get ('VersionString ' , False )), dict )
101
+ assert isinstance (parsed_out .get ('Commit ' , False ), str )
102
+ assert datetime . strptime ( parsed_out .get ('BuildDate' )[: - 2 ], '%Y-%m-%dT%H:%M:%S.%f' )
102
103
You can’t perform that action at this time.
0 commit comments