Skip to content

Commit

Permalink
Fix code style
Browse files Browse the repository at this point in the history
  • Loading branch information
David Hirschfeld committed Mar 12, 2020
1 parent ff1f3ce commit a7ae87f
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions tests/test_codegen.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import re
import sys
from io import StringIO
from textwrap import dedent

import pytest
import sqlalchemy
Expand Down Expand Up @@ -1296,15 +1295,15 @@ def test_table_comment(metadata):

codegen = CodeGenerator(metadata)
code = codegen.render_table(codegen.models[0])
expected = dedent("""
t_simple = Table(
'simple', metadata,
Column('id', Integer, primary_key=True),
comment='this is a \\'comment\\''
)
""")
assert code.strip() == expected.strip()
assert generate_code(metadata) == """\
assert code == """\
t_simple = Table(
'simple', metadata,
Column('id', Integer, primary_key=True),
comment='this is a \\'comment\\''
)
"""
code = generate_code(metadata)
assert code == """\
# coding: utf-8
from sqlalchemy import Column, Integer
from sqlalchemy.ext.declarative import declarative_base
Expand Down

0 comments on commit a7ae87f

Please sign in to comment.