Commits

Ronny Pfannschmidt committed 37762c2

pep 8 fixes

  • Participants
  • Parent commits 714f8d4

Comments (0)

Files changed (2)

 from hashlib import sha256
 from collections import namedtuple
 
+
 class Migration(namedtuple('MigrationBase', 'name checksum sql after')):
     __slots__ = ()
+
     def __repr__(self):
         return '<Migration {name} ck {checksum}..>'.format(
             name=self.name,
         )
 
 
-
 def parse_migration(sql):
     """
     parses the metadata of a migration text

testing/test_miromigrate.py

 import pytest
 import micromigrate as mm
 
+
 @pytest.fixture
 def plain_conn(request):
     import sqlite3
     #XXX: dump
     return conn
 
+
 def print_db(conn):
     print('\n'.join(conn.iterdump()))
 
+
 def test_parse_migration():
     result = mm.parse_migration("-- migration test")
     assert result.name == 'test'
     pytest.raises(AssertionError,
                   mm.parse_migration, "-- not named")
     result = mm.parse_migration(
-            "-- migration test\n"
-            "-- after fun")
+        "-- migration test\n"
+        "-- after fun")
     assert result.name == 'test'
     assert result.after == frozenset(('fun',))
 
         plain_conn, [migration])
     assert info.value.args[0].startswith('first migration must')
 
+
 def test_migration_state(plain_conn):
     assert mm.migration_state(plain_conn) is None
     plain_conn.execute(mm.initial_migration.sql)