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

litecli: build fails due to failing test #211482

Closed
sumnerevans opened this issue Jan 18, 2023 · 1 comment · Fixed by #212000
Closed

litecli: build fails due to failing test #211482

sumnerevans opened this issue Jan 18, 2023 · 1 comment · Fixed by #212000

Comments

@sumnerevans
Copy link
Contributor

Steps To Reproduce

Steps to reproduce the behavior:

  1. build litecli

Build log

https://gist.github.com/sumnerevans/e4eb46851b21507e4933fa672b0938c6

most relevant portion (test output)
============================= test session starts ==============================
platform linux -- Python 3.10.9, pytest-7.2.0, pluggy-1.0.0
rootdir: /build/litecli-1.8.0, configfile: setup.cfg
collecting ... ^Mcollecting 155 items                                                           ^Mcollected 203 items

litecli/packages/completion_engine.py .                                  [  0%]
litecli/packages/special/utils.py .                                      [  0%]
tests/test_clistyle.py ss                                                [  1%]
tests/test_completion_engine.py ........................................ [ 21%]
.....................x..............................................     [ 55%]
tests/test_completion_refresher.py ....                                  [ 57%]
tests/test_dbspecial.py .....                                            [ 59%]
tests/test_main.py ..........                                            [ 64%]
tests/test_parseutils.py .............X.........                         [ 75%]
tests/test_prompt_utils.py .                                             [ 76%]
tests/test_smart_completion_public_schema_only.py ................F..... [ 87%]
                                                                         [ 87%]
tests/test_sqlexecute.py ..................../build/litecli-1.8.0/tests
/build/litecli-1.8.0
......                      [100%]

=================================== FAILURES ===================================
_________________________ test_auto_escaped_col_names __________________________

completer = <litecli.sqlcompleter.SQLCompleter object at 0x7ffff5074fa0>
complete_event = <Mock id='140737304290992'>

    def test_auto_escaped_col_names(completer, complete_event):
        text = "SELECT  from `select`"
        position = len("SELECT ")
        result = list(
            completer.get_completions(
                Document(text=text, cursor_position=position), complete_event
            )
        )
>       assert (
            result
            == [
                Completion(text="*", start_position=0),
                Completion(text="`ABC`", start_position=0),
                Completion(text="`insert`", start_position=0),
                Completion(text="id", start_position=0),
            ]
            + list(map(Completion, completer.functions))
            + [Completion(text="`select`", start_position=0)]
            + list(map(Completion, sorted(completer.keywords)))
        )
E       AssertionError: assert [Completion(t...AVG')])), ...] == [Completion(t...AVG')])), ...]
E         At index 72 diff: Completion(text='select', start_position=0, display=FormattedText([('', 'select')])) != Completion(text='`select`', start_position=0, display=FormattedT>
E         Use -v to get more diff

complete_event = <Mock id='140737304290992'>
completer  = <litecli.sqlcompleter.SQLCompleter object at 0x7ffff5074fa0>
position   = 7
result     = [Completion(text='*', start_position=0, display=FormattedText([('', '*')])), Completion(text='`ABC`', start_position=0...lay=FormattedText([('', 'ABS')])), Completion(>
text       = 'SELECT  from `select`'

tests/test_smart_completion_public_schema_only.py:370: AssertionError

Additional context

I couldn't find any reports of this error on the upstream repository.

Notify maintainers

@Scriptkiddi

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.1.3, NixOS, 23.05 (Stoat), 23.05pre443927.6dccdc45851`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.12.0`
 - channels(root): `"nixos"`
 - channels(sumner): `"home-manager"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`
@vlaci
Copy link
Contributor

vlaci commented Jan 21, 2023

After bisecting I've found that the breakage is introduced by updating sqlparse to 0.4.3 in 539f174.

I've raised this upstream. It seems to be safe to ignore this error in nixpkgs.

vlaci added a commit to vlaci/nixpkgs that referenced this issue Jan 21, 2023
The issue is introduced by sqlparse 0.4.3

Resolves NixOS#211482
vlaci added a commit to vlaci/nixpkgs that referenced this issue Jan 21, 2023
The issue is introduced by sqlparse 0.4.3

Resolves NixOS#211482
vlaci added a commit to vlaci/nixpkgs that referenced this issue Jan 21, 2023
The issue is introduced by sqlparse 0.4.3

Resolves NixOS#211482
vlaci added a commit to vlaci/nixpkgs that referenced this issue Jan 21, 2023
The issue is introduced by sqlparse 0.4.3

Resolves NixOS#211482
vlaci added a commit to vlaci/nixpkgs that referenced this issue Jan 21, 2023
The issue is introduced by sqlparse 0.4.3

Resolves NixOS#211482
vlaci added a commit to vlaci/nixpkgs that referenced this issue Jan 21, 2023
The issue is introduced by sqlparse 0.4.3

Resolves NixOS#211482
RossComputerGuy pushed a commit to ExpidusOS/nixpkgs that referenced this issue Jan 23, 2023
The issue is introduced by sqlparse 0.4.3

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

Successfully merging a pull request may close this issue.

2 participants