Commits

Chris McDonough committed 068b99a

- Better coverage by removing dead/unused code.

  • Participants
  • Parent commits 6fc1e75

Comments (0)

Files changed (2)

pyramid_sqla/paster_templates/__init__.py

     summary = "Pyramid SQLAlchemy project with view handlers"
     template_renderer = staticmethod(paste_script_template_renderer)
 
-    def pre(self, command, output_dir, vars):
+    def pre(self, command, output_dir, vars): # pragma: no cover
         """Called before template is applied."""
         PyramidTemplate.pre(self, command, output_dir, vars)
         package_logger = vars['package']

pyramid_sqla/tests/test.py

         psa.reset()
         shutil.rmtree(self.dir, True)
 
-    def assertDatabaseExists(self, db_file):
-        self.assertEqual(os.path.exists(db_file), True)
-
-    def assertDatabaseDoesNotExist(self, db_file):
-        self.assertEqual(os.path.exists(db_file), False)
-
-    if not hasattr(unittest.TestCase, "assertIsInstance"):
+    if not hasattr(unittest.TestCase, "assertIsInstance"): # pragma: no cover
         def assertIsInstance(self, obj, classes):
             if not isinstance(obj, classes):
                 typ = type(obj)
         self.assertEqual(barney2.id, 3)
         self.assertEqual(barney2.first_name, u"Barney")
         self.assertEqual(barney2.last_name, u"Rubble")
-        sql = sa.select([Person.first_name])
+        sa.select([Person.first_name])
         # Can we iterate the first names in reverse alphabetical order?
         q = sess.query(Person.first_name).order_by(Person.first_name.desc())
         result = [x.first_name for x in q]
         self.assertEqual(barney2.id, 3)
         self.assertEqual(barney2.first_name, u"Barney")
         self.assertEqual(barney2.last_name, u"Rubble")
-        sql = sa.select([Person.first_name])
+        sa.select([Person.first_name])
         # Can we iterate the first names in reverse alphabetical order?
         q = sess.query(Person.first_name).order_by(Person.first_name.desc())
         result = [x.first_name for x in q]