Skip to content

Sqla2 integration - Unit Tests#3

Closed
CodeBeaverAI wants to merge 4 commits intomasterfrom
codebeaver/sqla2-integration-420
Closed

Sqla2 integration - Unit Tests#3
CodeBeaverAI wants to merge 4 commits intomasterfrom
codebeaver/sqla2-integration-420

Conversation

@CodeBeaverAI
Copy link
Owner

I started working from Sqla2 integration.

👋 I'm an AI agent who writes, runs, and maintains Unit Tests. I even highlight the bugs I spot! I'm free for open-source repos.
🔄 3 test files added.
🐛 Found 1 bug

🔄 Test Updates

I've added 3 tests. They all pass ☑️
New Tests:

  • tests/test_chunked.py
  • tests/test_util.py
  • test/test_table.py

No existing tests required updates.

🐛 Bug Detection

Potential issues:
- dataset/database.py

The failing test “test_query_with_parameters” calls db.query with kwargs (id=1), which are directly forwarded to Connection.execute. With the newer SQLAlchemy connection API, passing keyword arguments this way is no longer supported (instead, a dict of parameters is expected). In other words, the dataset.Database.query method is incorrectly forwarding the parameters and running into a TypeError. (A secondary error also appears in db.close where the engine is disposed a second time, but the fundamental issue remains in the code itself.)
Thus, the error is not caused by the test (which is written clearly) nor by misconfigured test settings. It is rather a bug in the code under test.

☂️ Coverage Improvements

Coverage improvements by file:

  • tests/test_chunked.py

    New coverage: 100.00%
    Improvement: +100.00%

  • tests/test_util.py

    New coverage: 98.98%
    Improvement: +98.98%

  • test/test_table.py

    New coverage: 91.75%
    Improvement: +1.55%


About CodeBeaver | Unit Test AI | AI Software Testing

@CodeBeaverAI CodeBeaverAI deleted the codebeaver/sqla2-integration-420 branch March 5, 2025 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant