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

test_mutate fails for a column name including ; #388

Open
exarkun opened this issue May 20, 2022 · 0 comments
Open

test_mutate fails for a column name including ; #388

exarkun opened this issue May 20, 2022 · 0 comments

Comments

@exarkun
Copy link
Collaborator

exarkun commented May 20, 2022

Test Pass 1
_zkapauthorizer.tests.test_sql
  MutateTests
    test_mutate ... Falsifying example: test_mutate(
    change=Update(table_name='0', table=Table(columns=[('\\', Column(affinity=<StorageAffinity.BLOB: 3>)), (';', Column(affinity=<StorageAffinity.TEXT: 2>))]), fields=(b'', '')),
    self=<_zkapauthorizer.tests.test_sql.MutateTests.test_mutate id=0x7f9216359a00>,
)
                                                    [ERROR]

===============================================================================
[ERROR]
Traceback (most recent call last):
Failure: testtools.testresult.real._StringException: Traceback (most recent call last):
  File "/home/exarkun/Work/PrivateStorage/ZKAPAuthorizer/src/_zkapauthorizer/tests/test_sql.py", line 44, in test_mutate
    @given(mutations)
  File "/nix/store/cbbm0m589h3bkqnx9qp40iswcfs8gl6y-python3-3.9.6-env/lib/python3.9/site-packages/hypothesis/core.py", line 1145, in wrapped_test
    state.execute_once(
  File "/nix/store/cbbm0m589h3bkqnx9qp40iswcfs8gl6y-python3-3.9.6-env/lib/python3.9/site-packages/hypothesis/core.py", line 661, in execute_once
    result = self.test_runner(data, run)
  File "/nix/store/cbbm0m589h3bkqnx9qp40iswcfs8gl6y-python3-3.9.6-env/lib/python3.9/site-packages/hypothesis/executors.py", line 47, in default_new_style_executor
    return function(data)
  File "/nix/store/cbbm0m589h3bkqnx9qp40iswcfs8gl6y-python3-3.9.6-env/lib/python3.9/site-packages/hypothesis/core.py", line 657, in run
    return test(*args, **kwargs)
  File "/home/exarkun/Work/PrivateStorage/ZKAPAuthorizer/src/_zkapauthorizer/tests/test_sql.py", line 52, in test_mutate
    statement_mutates(change.statement()),
  File "/home/exarkun/Work/PrivateStorage/ZKAPAuthorizer/src/_zkapauthorizer/sql.py", line 281, in statement_mutates
    (parsed,) = parse(statement)
ValueError: too many values to unpack (expected 1)


_zkapauthorizer.tests.test_sql.MutateTests.test_mutate
-------------------------------------------------------------------------------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant