From: Oleg Broytman Date: Wed, 16 May 2018 20:44:39 +0000 (+0300) Subject: Tests(glst): Fix file name in inline test; print first 5 genres X-Git-Tag: 0.1.1~2 X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=1453a9b4d51bbb10e3e145c1b22970fb3b08801a;p=m_librarian.git Tests(glst): Fix file name in inline test; print first 5 genres --- diff --git a/m_librarian/glst.py b/m_librarian/glst.py index 9b16c14..fedb27b 100755 --- a/m_librarian/glst.py +++ b/m_librarian/glst.py @@ -65,7 +65,13 @@ def import_glst(): def test(): ml_dir = os.path.dirname(__file__) - print(parse_glst_file(os.path.join(ml_dir, 'glst', 'genres_fb2.glst'))) + for i, (name, title) in enumerate(parse_glst_file( + os.path.join(ml_dir, 'glst', 'genres_fb2_flibusta.glst') + )): + if i < 5: + print(name, title) + else: + break if __name__ == '__main__':