Пример #1
0
    def test_cmptuple(self):
        One = misc_utils.cmptuple('Bla', 'a b c')
        Two = misc_utils.cmptuple('Bli', 'd e f')

        args = (1, 2, 3)
        one = One(*args)
        two = Two(*args)
        self.assertFalse(one == two)
Пример #2
0
    def test_cmptuple(self):
        # pylint: disable=invalid-name
        One = misc_utils.cmptuple('Bla', 'a b c')
        Two = misc_utils.cmptuple('Bli', 'd e f')

        args = (1, 2, 3)
        one = One(*args)
        two = Two(*args)
        self.assertFalse(one == two)
Пример #3
0
# Attributes:
#   statement: An instance of a compiled statement to explain.
Explain = collections.namedtuple('Explain', 'statement')

# RunCustom command (runs a custom query defined in the input file).
#
# Attributes:
#   query_name: A string, the name of the custom query.
RunCustom = collections.namedtuple('RunCustom', 'query_name')

# A parsed SELECT column or target.
#
# Attributes:
#   expression: A tree of expression nodes from the parser.
#   name: A string, the given name of the target (given by "AS <name>").
Target = cmptuple('Target', 'expression name')

# A wildcard target. This replaces the list in Select.targets.
Wildcard = cmptuple('Wildcard', '')

# A FROM clause.
#
# Attributes:
#   expression: A tree of expression nodes from the parser.
#   close: A CLOSE clause, either None if absent, a boolean if the clause
#     was present by no date was provided, or a datetime.date instance if
#     a date was provided.
From = cmptuple('From', 'expression open close clear')

# A GROUP BY clause.
#