From a7ae87fb9f20bb47215ad2d44e1bbdf4c861ac9a Mon Sep 17 00:00:00 2001 From: David Hirschfeld Date: Thu, 12 Mar 2020 16:11:37 +1000 Subject: [PATCH] Fix code style --- tests/test_codegen.py | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/tests/test_codegen.py b/tests/test_codegen.py index f00cb1d..390ee5b 100644 --- a/tests/test_codegen.py +++ b/tests/test_codegen.py @@ -3,7 +3,6 @@ import re import sys from io import StringIO -from textwrap import dedent import pytest import sqlalchemy @@ -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