MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / _test

Method _test

test/orm/test_mapper.py:2948–2959  ·  view source on GitHub ↗
(self, value, instancelevel=None)

Source from the content-addressed store, hash-verified

2946 )
2947
2948 def _test(self, value, instancelevel=None):
2949 class Foo:
2950 someprop = value
2951
2952 m = self.mapper(Foo, self.tables.foo)
2953 eq_(Foo.someprop, value)
2954 f1 = Foo()
2955 if instancelevel is not None:
2956 eq_(f1.someprop, instancelevel)
2957 else:
2958 eq_(f1.someprop, value)
2959 assert self.tables.foo.c.someprop not in m._columntoproperty
2960
2961 def _test_not(self, value):
2962 class Foo:

Callers 6

test_stringMethod · 0.95
test_unicodeMethod · 0.95
test_intMethod · 0.95
test_dictMethod · 0.95
test_setMethod · 0.95
test_descriptorMethod · 0.95

Calls 3

eq_Function · 0.90
FooClass · 0.70
mapperMethod · 0.45

Tested by

no test coverage detected