diff --git a/AUTHORS b/AUTHORS index db49b9eb4..88abeccb3 100644 --- a/AUTHORS +++ b/AUTHORS @@ -154,6 +154,7 @@ Contributors: * Diego * Chris (ChrisJr404) * Pieter Ouwerkerk (pouwerkerk) + * Paco Cartones (pacocartones) Creator: -------- diff --git a/changelog.rst b/changelog.rst index 0fe57c725..52686a233 100644 --- a/changelog.rst +++ b/changelog.rst @@ -9,6 +9,18 @@ Internal: ``Scenario: edit sql in file with external editor`` as an error. Raised to 10 seconds; passing runs are unaffected because pexpect returns as soon as the expected text appears. +* Remove a stale ``@pytest.mark.xfail`` on + ``test_simple_insert_single_table_schema_qualified``. It was marked for an old + ``sqlparse`` that mislabeled schema-qualified ``INSERT``; the test now passes + across the supported ``sqlparse`` range (0.3.0 to 0.6.x), so the marker only + hid a passing test (an unreported XPASS, since ``xfail_strict`` is not set). +* Document the still-needed ``@pytest.mark.xfail`` on + ``test_sub_select_multiple_col_name_completion``, which was added in 2015 + without explanation. The parser still misidentifies the token before the + trailing comma in an incomplete multi-column sub-select + (``SELECT a, FROM abc``) as a table, so the marker now carries a ``reason`` + recording that this remains an expected failure on the supported + ``sqlparse`` range. Bug fixes: ---------- diff --git a/tests/parseutils/test_parseutils.py b/tests/parseutils/test_parseutils.py index 90749ebfc..e9cc1d117 100644 --- a/tests/parseutils/test_parseutils.py +++ b/tests/parseutils/test_parseutils.py @@ -106,7 +106,6 @@ def test_simple_insert_single_table(): assert tables == ((None, "abc", "abc", False),) -@pytest.mark.xfail def test_simple_insert_single_table_schema_qualified(): tables = extract_tables('insert into abc.def (id, name) values (1, "def")') assert tables == (("abc", "def", None, False),) diff --git a/tests/test_sqlcompletion.py b/tests/test_sqlcompletion.py index 9deb3455d..20abb99a9 100644 --- a/tests/test_sqlcompletion.py +++ b/tests/test_sqlcompletion.py @@ -450,7 +450,12 @@ def test_sub_select_col_name_completion(): } -@pytest.mark.xfail +@pytest.mark.xfail( + reason="Parsing an incomplete multi-column sub-select still misidentifies the " + "token before the trailing comma as a table: 'SELECT a, FROM abc' yields " + "table_refs for both 'a' and 'abc' instead of just 'abc'. Confirmed still " + "failing on sqlparse 0.6.0." +) def test_sub_select_multiple_col_name_completion(): suggestions = suggest_type("SELECT * FROM (SELECT a, FROM abc", "SELECT * FROM (SELECT a, ") assert set(suggestions) == cols_etc("abc")