pep8 and other code-style changes
[librarian.git] / tests / test_picture.py
index 1169f44..00b03ce 100644 (file)
@@ -4,16 +4,14 @@
 # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
 #
 from librarian import picture, dcparser
-from lxml import etree
-from nose.tools import *
-from os.path import splitext
 from tests.utils import get_all_fixtures, get_fixture
-import codecs
 from os import path
 
+
 def test_wlpictureuri():
     uri = picture.WLPictureURI('http://wolnelektury.pl/katalog/obraz/angelus-novus')
 
+
 def check_load(xml_file):
     pi = dcparser.parse(xml_file, picture.PictureInfo)
     assert pi is not None
@@ -39,6 +37,7 @@ def test_wlpicture():
     f = wlp.image_file('r')
     f.close()
 
+
 def test_picture_parts():
     wlp = picture.WLPicture.from_file(open(get_fixture('picture', 'angelus-novus.xml')))
     parts = list(wlp.partiter())
@@ -55,7 +54,5 @@ def test_picture_parts():
         if p['object']:
             names.add(p['object'])
 
-    assert motifs == set([u'anioł historii', u'spojrzenie']), "missing motifs, got: %s" % motifs
-    assert names == set([u'obraz cały', u'skrzydło']), 'missing objects, got: %s' % names
-    
-        
+    assert motifs == {u'anioł historii', u'spojrzenie'}, "missing motifs, got: %s" % motifs
+    assert names == {u'obraz cały', u'skrzydło'}, 'missing objects, got: %s' % names