MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / Point

Class Point

test/orm/test_composites.py:76–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

74 graphs, edges = cls.tables.graphs, cls.tables.edges
75
76 class Point(cls.Comparable):
77 def __init__(self, x, y):
78 self.x = x
79 self.y = y
80
81 def __composite_values__(self):
82 return [self.x, self.y]
83
84 __hash__ = None
85
86 def __eq__(self, other):
87 return (
88 isinstance(other, Point)
89 and other.x == self.x
90 and other.y == self.y
91 )
92
93 def __ne__(self, other):
94 return not isinstance(other, Point) or not self.__eq__(other)
95
96 class Graph(cls.Comparable):
97 pass

Callers 15

_fixtureMethod · 0.70
test_round_tripMethod · 0.70
test_detect_changeMethod · 0.70
test_not_noneMethod · 0.70
goMethod · 0.70
test_comparatorMethod · 0.70
test_update_crit_sqlMethod · 0.70
test_bulk_insertMethod · 0.70

Calls

no outgoing calls

Tested by 15

_fixtureMethod · 0.56
test_round_tripMethod · 0.56
test_detect_changeMethod · 0.56
test_not_noneMethod · 0.56
goMethod · 0.56
test_comparatorMethod · 0.56
test_update_crit_sqlMethod · 0.56
test_bulk_insertMethod · 0.56