Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

19 new failing tests for 1.2 in test_types.py and test_select.py #30

Open
gijzelaerr opened this issue Mar 3, 2018 · 4 comments
Open

Comments

@gijzelaerr
Copy link
Collaborator

gijzelaerr commented Mar 3, 2018

test/test_suite.py::JSONTest::test_crit_against_int_basic 
test/test_suite.py::JSONTest::test_crit_against_int_coerce_type
test/test_suite.py::JSONTest::test_crit_against_string_basic
test/test_suite.py::JSONTest::test_crit_against_string_coerce_type 
test/test_suite.py::JSONTest::test_crit_mixed_path 
test/test_suite.py::JSONTest::test_crit_simple_int 
test/test_suite.py::JSONTest::test_crit_spaces_in_key 
test/test_suite.py::JSONTest::test_crit_string_path 
test/test_suite.py::JSONTest::test_eval_none_flag_orm 
test/test_suite.py::JSONTest::test_round_trip_data1 
test/test_suite.py::JSONTest::test_round_trip_json_null_as_json_null
test/test_suite.py::JSONTest::test_round_trip_none_as_json_null 
test/test_suite.py::JSONTest::test_round_trip_none_as_sql_null
test/test_suite.py::JSONTest::test_unicode_round_trip 
test/test_suite.py::LastrowidTest_monetdb+pymonetdb::test_autoincrement_on_insert
test/test_suite.py::LastrowidTest_monetdb+pymonetdb::test_last_inserted_id 
test/test_suite.py::LastrowidTest_monetdb+pymonetdb::test_native_lastrowid_autoinc 
test/test_suite.py::LikeFunctionsTest_monetdb+pymonetdb::test_contains_autoescape 
test/test_suite.py::LikeFunctionsTest_monetdb+pymonetdb::test_contains_autoescape_escape
test/test_suite.py::LikeFunctionsTest_monetdb+pymonetdb::test_contains_escape
test/test_suite.py::LikeFunctionsTest_monetdb+pymonetdb::test_contains_unescaped 
test/test_suite.py::LikeFunctionsTest_monetdb+pymonetdb::test_endswith_autoescape
test/test_suite.py::LikeFunctionsTest_monetdb+pymonetdb::test_endswith_autoescape_escape
test/test_suite.py::DateTimeMicrosecondsTest::test_literal 
test/test_suite.py::DateTimeMicrosecondsTest::test_null
test/test_suite.py::DateTimeMicrosecondsTest::test_round_trip
test/test_suite.py::AutocommitTest::test_autocommit_off
test/test_suite.py::AutocommitTest::test_autocommit_on

but it looks tike there are eventually only 2 problems:

  File "/home/travis/virtualenv/python3.6.3/lib/python3.6/site-packages/sqlalchemy/testing/plugin/plugin_base.py", line 567, in <genexpr>
    for config_obj in config.Config.all_configs()
TypeError: 'NoneType' object is not iterable

ValueError: unsupported format character ''' (0x27) at index 71
  File "/home/travis/virtualenv/python3.6.3/lib/python3.6/site-packages/sqlalchemy/testing/plugin/plugin_base.py", line 567, in <genexpr>
    for config_obj in config.Config.all_configs()
TypeError: 'NoneType' object is not iterable
@sambu16
Copy link

sambu16 commented May 11, 2018

Implement _get_server_version_info on the Dialect class to prevent this error, this is my recent implementation to fix the error myself, hope it helps:

def _get_server_version_info(self, connection):
    """Get the version of the HANA server used by a connection.

    Returns a tuple of (`major`, `minor`, `service pack`, `patch`, `build`)
    """
    db_version = connection.execute("SELECT VERSION FROM SYS.M_DATABASE").scalar()
    m = re.match(r"(\d+).(\d+).(\d+).(\d+).(\d+)", db_version)
    if m:
        return tuple(int(x) for x in m.group(1, 2, 3, 4, 5))
    else:
        return None

@gijzelaerr
Copy link
Collaborator Author

thanks @patbuxton, looking good! Can you issue a Pull request with the change?

@sambu16
Copy link

sambu16 commented May 11, 2018

Sorry, my change is for SAP HANA dialect, I don't know what the equivalent query is for MonetDB - I don't have the repo cloned or an instance to try with, I just came across your comment when I was Googling for the error.

@gijzelaerr
Copy link
Collaborator Author

ok no worries, thanks for the help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants