#NEWLINE# def test_single_detects_conflict( self ) : #NEWLINE# #INDENT# class Person ( Base ) : #NEWLINE# #INDENT# __tablename__ = 'people' #NEWLINE# id = Column ( Integer , primary_key = True ) #NEWLINE# name = Column ( String ( 50 ) ) #NEWLINE# discriminator = Column ( 'type' , String ( 50 ) ) #NEWLINE# __mapper_args__ = { #NEWLINE# #INDENT# 'polymorphic_on' : discriminator , #NEWLINE# #UNINDENT# } #NEWLINE# #UNINDENT# class Engineer ( Person ) : #NEWLINE# #INDENT# __mapper_args__ = { #NEWLINE# #INDENT# 'polymorphic_identity' : 'engineer' , #NEWLINE# #UNINDENT# } #NEWLINE# primary_language = Column ( String ( 50 ) ) #NEWLINE# #UNINDENT# def go( ) : #NEWLINE# #INDENT# class Manager ( Person ) : #NEWLINE# #INDENT# __mapper_args__ = { #NEWLINE# #INDENT# 'polymorphic_identity' : 'manager' , #NEWLINE# #UNINDENT# } #NEWLINE# golf_swing = Column ( String ( 50 ) ) #NEWLINE# primary_language = Column ( String ( 50 ) ) #NEWLINE# #UNINDENT# #UNINDENT# assert_raises ( sa . exc . ArgumentError , go ) #NEWLINE# def go( ) : #NEWLINE# #INDENT# class Salesman ( Person ) : #NEWLINE# #INDENT# __mapper_args__ = { #NEWLINE# #INDENT# 'polymorphic_identity' : 'manager' , #NEWLINE# #UNINDENT# } #NEWLINE# name = Column ( String ( 50 ) ) #NEWLINE# #UNINDENT# #UNINDENT# assert_raises ( sa . exc . ArgumentError , go )