Skip to content

Commit

Permalink
Fix list sorting test to be case insensitive for Travis
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonscript committed Mar 28, 2021
1 parent 0c4f1a5 commit a527bf8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion fylm/fylmlib/formatter.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
import fylmlib.patterns as patterns

def build_new_basename(file, type="file"):
"""Build a new file or folder name from the specified renaming pattern.
r"""Build a new file or folder name from the specified renaming pattern.
Using regular expressions and a { } templating syntax, construct
a new filename by mapping available properties to config.rename_pattern.
Expand Down
6 changes: 3 additions & 3 deletions fylm/tests/test_operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def test_get_new_films_multiple_dirs(self):
# Make files in alternate path

make.make_mock_file(os.path.join(
conftest.films_src_path2, 'Alita.Battle.Angel.2019.BluRay.1080p.x264-NMaRE/Alita.Battle.Angel.2019.2017.BluRay.1080p.x264-NMaRE.mkv'),
conftest.films_src_path2, 'Alita.Battle.Angel.2019.BluRay.1080p.x264-NMaRE/Alita.Battle.Angel.2019.BluRay.1080p.x264-NMaRE.mkv'),
8132 * make.mb * t)

make.make_mock_file(os.path.join(
Expand All @@ -116,8 +116,8 @@ def test_get_new_films_multiple_dirs(self):
# Assert that we're getting the expected number of valid films. (+2 for the 2 we added)
assert(len(valid_films) == len(conftest.expected) + 2)

# Assert that the list is sorted alphabetically
assert(all(valid_films[i].title <= valid_films[i+1].title
# Assert that the list is sorted alphabetically (case insensitive is fine)
assert(all(valid_films[i].title.lower() <= valid_films[i+1].title.lower()
for i in range(len(valid_films)-1)))

def test_get_valid_files(self):
Expand Down

0 comments on commit a527bf8

Please sign in to comment.