Running all tests yields passes...
pytest tests/
...
57 passed in 4.02 seconds
...however, running test_errors_on_delete by itself fails because models.NewStyleModel doesn't set up the queryable attributes properly:
pytest tests/test_session.py -k test_errors_on_delete
...
tests/test_session.py::TestSession::test_errors_on_delete ERROR
...
tests/test_session.py:16:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
<string>:4: in __init__
???
../../.pyenv/versions/3.5.3/envs/temporal-sqlalchemy/lib/python3.5/site-packages/sqlalchemy/orm/state.py:408: in _initialize_instance
manager.dispatch.init(self, args, kwargs)
../../.pyenv/versions/3.5.3/envs/temporal-sqlalchemy/lib/python3.5/site-packages/sqlalchemy/event/attr.py:256: in __call__
fn(*args, **kw)
../../.pyenv/versions/3.5.3/envs/temporal-sqlalchemy/lib/python3.5/site-packages/sqlalchemy/orm/events.py:202: in wrap
return fn(state.obj(), *arg, **kw)
temporal_sqlalchemy/core.py:134: in init_clock
entity=clocked,
<string>:4: in __init__
???
../../.pyenv/versions/3.5.3/envs/temporal-sqlalchemy/lib/python3.5/site-packages/sqlalchemy/orm/state.py:414: in _initialize_instance
manager.dispatch.init_failure(self, args, kwargs)
../../.pyenv/versions/3.5.3/envs/temporal-sqlalchemy/lib/python3.5/site-packages/sqlalchemy/util/langhelpers.py:66: in __exit__
compat.reraise(exc_type, exc_value, exc_tb)
../../.pyenv/versions/3.5.3/envs/temporal-sqlalchemy/lib/python3.5/site-packages/sqlalchemy/util/compat.py:187: in reraise
raise value
../../.pyenv/versions/3.5.3/envs/temporal-sqlalchemy/lib/python3.5/site-packages/sqlalchemy/orm/state.py:411: in _initialize_instance
return manager.original_init(*mixed[1:], **kwargs)
../../.pyenv/versions/3.5.3/envs/temporal-sqlalchemy/lib/python3.5/site-packages/sqlalchemy/ext/declarative/base.py:654: in _declarative_constructor
setattr(self, k, kwargs[k])
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <sqlalchemy.orm.attributes.InstrumentedAttribute object at 0x1050c0f68>
instance = <temporal_sqlalchemy.clock.NewStyleModelClock object at 0x1051ddcf8>, value = <tests.models.NewStyleModel object at 0x1051c6e80>
def __set__(self, instance, value):
> self.impl.set(instance_state(instance),
instance_dict(instance), value, None)
E AttributeError: 'NoneType' object has no attribute 'set'
Running all tests yields passes...
pytest tests/ ... 57 passed in 4.02 seconds...however, running
test_errors_on_deleteby itself fails becausemodels.NewStyleModeldoesn't set up the queryable attributes properly: