]> git.phdru.name Git - m_librarian.git/commitdiff
Tests(glst): Fix file name in inline test; print first 5 genres
authorOleg Broytman <phd@phdru.name>
Wed, 16 May 2018 20:44:39 +0000 (23:44 +0300)
committerOleg Broytman <phd@phdru.name>
Wed, 16 May 2018 21:16:33 +0000 (00:16 +0300)
m_librarian/glst.py

index 9b16c14e69755ada314f0e848dd5f65b22b78b7e..fedb27b2ed6647fe38b2d8569f7a0483fcad355e 100755 (executable)
@@ -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__':