repair testing assertsql system to deal with intermediary statements

Issue #3293 resolved
Michael Bayer
repo owner created an issue
==================================================================================== FAILURES ====================================================================================
_____________________________________________________________________ QueryTest.test_disable_scope_identity ______________________________________________________________________
Traceback (most recent call last):
  File "<string>", line 2, in test_disable_scope_identity
  File "/Users/classic/dev/sqlalchemy/test/../lib/sqlalchemy/testing/exclusions.py", line 95, in decorate
    return self._do(config._current, fn, *args, **kw)
  File "/Users/classic/dev/sqlalchemy/test/../lib/sqlalchemy/testing/exclusions.py", line 124, in _do
    self._expect_failure(config, ex, name=fn.__name__)
  File "/Users/classic/dev/sqlalchemy/test/../lib/sqlalchemy/testing/exclusions.py", line 136, in _expect_failure
    util.raise_from_cause(ex)
  File "/Users/classic/dev/sqlalchemy/test/../lib/sqlalchemy/util/compat.py", line 199, in raise_from_cause
    reraise(type(exception), exception, tb=exc_tb)
  File "/Users/classic/dev/sqlalchemy/test/../lib/sqlalchemy/testing/exclusions.py", line 122, in _do
    return_value = fn(*args, **kw)
  File "<string>", line 2, in test_disable_scope_identity
  File "/Users/classic/dev/sqlalchemy/test/../lib/sqlalchemy/testing/util.py", line 191, in provide_metadata
    return fn(*args, **kw)
  File "/Users/classic/dev/sqlalchemy/test/dialect/mssql/test_query.py", line 250, in test_disable_scope_identity
    ExactSQL("INSERT INTO t1 DEFAULT VALUES"),
  File "/Users/classic/dev/sqlalchemy/test/../lib/sqlalchemy/testing/assertions.py", line 420, in assert_sql_execution
    asserter.assert_(*rules)
  File "/Users/classic/dev/sqlalchemy/test/../lib/sqlalchemy/testing/assertsql.py", line 373, in assert_
    if not rule.consume_final():
  File "/Users/classic/dev/sqlalchemy/test/../lib/sqlalchemy/testing/assertsql.py", line 50, in consume_final
    assert False, 'Rule has not been consumed'
AssertionError: Rule has not been consumed
============================================================================ short test summary info =============================================================================
FAIL test/dialect/mssql/test_query.py::QueryTest::()::test_disable_scope_identity

we need a system that can log "real" statements as well as the "intermediary" ones like sequences and stuff, and can assert both or ignore the "intermediary" ones. the rules / observations here need to be a lot smarter. try to get this for 1.0.

Comments (1)

  1. Log in to comment