Skip to content

Commit 3c6916a

Browse files
committed
make the results no be order dependent
1 parent 0adacee commit 3c6916a

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

test/cli/slnx-folders_test.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
__script_dir = os.path.dirname(os.path.abspath(__file__))
1010
__proj_dir = os.path.join(__script_dir, 'slnx-folders')
1111

12+
def get_lines(s):
13+
return sorted(s.split('\n'))
1214

1315
# Get Visual Studio configurations checking a file
1416
# Checking {file} {config}...
@@ -38,7 +40,7 @@ def test_relative_path():
3840
'[%s:5]: (error) Division by zero.\n'
3941
'[%s:7]: (error) Division by zero.\n' % (filename1, filename2)
4042
)
41-
assert stderr == expected
43+
assert get_lines(stderr) == get_lines(expected)
4244

4345
def test_local_path():
4446
args = [
@@ -53,7 +55,7 @@ def test_local_path():
5355
'[%s:5]: (error) Division by zero.\n'
5456
'[%s:7]: (error) Division by zero.\n' % (filename1, filename2)
5557
)
56-
assert stderr == expected
58+
assert get_lines(stderr) == get_lines(expected)
5759

5860
def test_absolute_path():
5961
args = [
@@ -68,4 +70,4 @@ def test_absolute_path():
6870
'[%s:5]: (error) Division by zero.\n'
6971
'[%s:7]: (error) Division by zero.\n' % (filename1, filename2)
7072
)
71-
assert stderr == expected
73+
assert get_lines(stderr) == get_lines(expected)

0 commit comments

Comments
 (0)