Mike Bayer avatar Mike Bayer committed 8abe3ef

tweaks

Comments (0)

Files changed (1)

test/orm/inheritance3.py

 
 class Page(BaseObject):
     def __repr__(self):
-        return "%s(%s)" % (self.__class__.__name__, repr(self.page_no))
+        return "%s(%s)" % (self.__class__.__name__, str(self.page_no))
 
 class MagazinePage(Page):
     def __repr__(self):
-        return "%s(%s, %s)" % (self.__class__.__name__, repr(self.page_no), repr(self.magazine))
+        return "%s(%s, %s)" % (self.__class__.__name__, str(self.page_no), repr(self.magazine))
 
 class ClassifiedPage(MagazinePage):
     pass
 
         classified_page_mapper = mapper(ClassifiedPage, classified_page_table, inherits=magazine_page_mapper, polymorphic_identity='c')
 
+    def tearDown(self):
+        for t in metadata.table_iterator(reverse=True):
+            t.delete().execute()
+
     def tearDownAll(self):
         metadata.drop_all()
         clear_mappers()
         assert repr(p.issues[0].locations[0].magazine.pages) == repr([page, page2, page3])
         
 if __name__ == '__main__':
-    testbase.main()
+    testbase.main()
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.