def _assert_date(self, expression, pattern, expected):
        res = self._query_to_date(expression, pattern)

        if len(res) == 0:
            self.fail("Expected that query '%(query)s' would return one row with one column. Got nothing." % locals())

        elif len(res[0]) == 0:
            self.fail("Expected that query '%(query)s' would return one row and one column. Got one row and no column."
                      % locals())

        self.assertEqual(expected, res[0][0], (str(expected), str(res[0][0])) % "Expected date '%s' but got: '%s'")
dataset/ETHPy150Open uber/vertica-python/vertica_python/tests/date_tests.py/DateParsingTestCase._assert_date/swapped operands of `%`