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

Fix tests for Python 3.11 #502

Closed
simonw opened this issue Oct 25, 2022 · 1 comment
Closed

Fix tests for Python 3.11 #502

simonw opened this issue Oct 25, 2022 · 1 comment
Labels
bug Something isn't working ci

Comments

@simonw
Copy link
Owner

simonw commented Oct 25, 2022

The way errors are represented has changed: https://github.com/simonw/sqlite-utils/actions/runs/3323588047/jobs/5494127154

_________________________ test_query_invalid_function __________________________

db_path = '/tmp/pytest-of-runner/pytest-0/test_query_invalid_function0/test.db'

    def test_query_invalid_function(db_path):
        result = CliRunner().invoke(
            cli.cli, [db_path, "select bad()", "--functions", "def invalid_python"]
        )
        assert result.exit_code == 1
>       assert (
            result.output.strip()
            == "Error: Error in functions definition: invalid syntax (<string>, line 1)"
        )
E       AssertionError: assert 'Error: Error...ing>, line 1)' == 'Error: Error...ing>, line 1)'
E         - Error: Error in functions definition: invalid syntax (<string>, line 1)
E         ?                                       ^^^^^^  ^^^^^^
E         + Error: Error in functions definition: expected '(' (<string>, line 1)
E         ?                                       ^^^^^^^  ^^^
@simonw
Copy link
Owner Author

simonw commented Oct 25, 2022

Replicated locally using a fresh virtual environment with Python 3.11 and:

 pytest -k test_query_invalid_function

@simonw simonw closed this as completed in 7b2d1c0 Oct 25, 2022
simonw added a commit that referenced this issue Oct 25, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ci
Projects
None yet
Development

No branches or pull requests

1 participant