Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5c0aa82

Browse files
Psimagetrekhleb
authored andcommitted
Fix test_glob (trekhleb#4)
* Fix test_glob== operator for lists relies on the order of elements in the list. cmp() does not.In my case, on Linux Mint, python3.6 glob() returned list had items in reverse order then expected in the test.The glob() doc doesn't specify specific ordering.cmp() for list objects doesn't rely on the order of items and produces the right result.* Use python3
1 parenta0b6fad commit5c0aa82

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎src/standard_libraries/test_glob.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
deftest_glob():
1212
"""File Wildcards."""
1313

14-
assertglob.glob('src/standard_libraries/glob_files/*.txt')== [
14+
assertsorted(glob.glob('src/standard_libraries/glob_files/*.txt'))==sorted([
1515
'src/standard_libraries/glob_files/first_file.txt',
1616
'src/standard_libraries/glob_files/second_file.txt'
17-
]
17+
])

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp