From 1453a9b4d51bbb10e3e145c1b22970fb3b08801a Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Wed, 16 May 2018 23:44:39 +0300 Subject: [PATCH] Tests(glst): Fix file name in inline test; print first 5 genres --- m_librarian/glst.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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__': -- 2.39.5