9 Commits

Author SHA1 Message Date
Nick Pope
cc52e02c96 Refs #32948 -- Added more tests for django.utils.tree.Node.
The tests for creating new instances or copying instances of Node and
its subclasses didn't fully capture the behaviour of the implementation,
particularly around whether the `children` list or is contents were the
same as the source.
2022-07-27 07:58:29 +02:00
Nick Pope
769d7cce4a Used AND, OR, XOR constants instead of hard-coded values. 2022-07-27 07:55:09 +02:00
django-bot
9c19aff7c7 Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
Simon Charette
b81c7562fc Fixed #32717 -- Fixed filtering of querysets combined with the | operator.
Address a long standing bug in a Where.add optimization to discard
equal nodes that was surfaced by implementing equality for Lookup
instances in bbf141bcdc31f1324048af9233583a523ac54c94.

Thanks Shaheed Haque for the report.
2021-05-13 07:26:52 +02:00
aspalding
dc5e75d419 Fixed #29838 -- Fixed crash when combining Q objects with __in lookups and lists.
Regression in fc6528b25ab1834be1a478b405bf8f7ec5cf860c.
2018-10-17 11:34:49 -04:00
Mariusz Felisiak
9fee229874
Fixed #29643 -- Fixed crash when combining Q objects with __in lookups and lists.
Regression in fc6528b25ab1834be1a478b405bf8f7ec5cf860c.
2018-08-08 08:51:20 +02:00
Mariusz Felisiak
fc6528b25a Fixed #28629 -- Made tree.Node instances hashable.
Regression in 508b5debfb16843a8443ebac82c1fb91f15da687 which
added Node.__eq__().
2017-09-28 12:07:19 -04:00
Ian Foote
508b5debfb Refs #11964 -- Made Q objects deconstructible. 2017-02-23 20:47:48 -05:00
Moayad Mardini
393ddc10a7 Fixed #22531 -- Added tree.Node.__repr__ and tests for the class.
While Node class has a useful `__str__`, its `__repr__` is not that
useful. Added a `__repr__` that makes use of the current `__str__`.
This is especially useful since the more popular `Q` class inherits
`tree.Node`. Also created new tests that cover most of `Node` class
functionality.
2014-05-16 09:30:25 -04:00