Skip to content
This repository has been archived by the owner on Jan 31, 2023. It is now read-only.

Commit

Permalink
updated tests
Browse files Browse the repository at this point in the history
  • Loading branch information
adbenitez committed Aug 1, 2018
1 parent 29628a7 commit 77afae1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
2 changes: 0 additions & 2 deletions smd/__init__.py
Expand Up @@ -28,8 +28,6 @@
else:
lang = gettext.translation('smd', localedir=localedir, languages=[lang])
lang.install()
#gettext.bindtextdomain('smd', localedir)
#gettext.textdomain('smd')
gettext.gettext = _
# must be imported after L10n:
import argparse
Expand Down
9 changes: 4 additions & 5 deletions tests/test_utils.py
Expand Up @@ -354,11 +354,10 @@ def test_select_chapters(self):
with open(os.path.join(self.data_dir, 'chapters.json')) as data_fh:
chapters = [tuple(l) for l in json.load(data_fh)]
selectors = ['1:10', '-1', '!-3', '1,3,5', ':5, !3, 7:, !9:10']
exp_values = [set(chapters[0:10]), set([chapters[-1]]),
set(chapters) - set([chapters[-3]]),
set([chapters[0], chapters[2], chapters[4]]),
set(chapters[:5]+chapters[6:]) -
set([chapters[2]]+chapters[8:10])]
exp_values = [chapters[:10], [chapters[-1]],
chapters[:-3] + chapters[-2:],
[chapters[0], chapters[2], chapters[4]],
chapters[:2]+chapters[3:5]+chapters[6:8]+chapters[10:]]
for selector, exp in zip(selectors, exp_values):
with self.subTest(selector=selector):
selec = utils.select_chapters(chapters, selector)
Expand Down

0 comments on commit 77afae1

Please sign in to comment.