Open
Conversation
See: * test_woql_graph_operations.py * test_woql_query_builder.py
…rminusdb/terminusdb-client-python into issue/123-improve-test-coverage
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR improves test coverage for
terminusdb_client/woqlquery/woql_query.py, increasing coverage from 85% to 94% (+9 percentage points).Before (main branch):
After:
Test Files Created (19 new files, 765 new tests)
Core Test Files
test_woql_core.py- Core WOQL query functionality teststest_woql_query_overall.py- Overall query integration teststest_woql_query_edge_cases.py- General query edge casestest_woql_test_helpers.py- Test helper utilities and fixturesEdge Case & Advanced Tests
test_woql_edge_cases_extended.py- Vocabulary, select, as(), cursor, arithmetic, Doc/Varstest_woql_advanced_features.py- Advanced filtering, aggregation, subqueries, recursive queries, complex patternstest_woql_remaining_edge_cases.py- Args introspection for 30+ methods, distinct, as() edge casesOperation-Specific Tests
test_woql_set_operations.py- Concat, join, sum, slice, set operations (member, difference, intersection, union)test_woql_graph_operations.py- Graph modification, queries, traversal, analytics, context, updates, metadatatest_woql_path_operations.py- Path operations, triple/quad operations, added/removed triplestest_woql_json_operations.py- JSON serialization, document handling, type conversionstest_woql_subquery_aggregation.py- Subquery execution, aggregation functions, group by, having clausesBuilder & Utility Tests
test_woql_query_builder.py- Query builder methods, internal functions, contains_update checkstest_woql_cursor_management.py- Cursor positioning, movement, state management, data value cleaningtest_woql_utility_methods.py- Find last subject, same entry comparison, string matching, triple builder contexttest_woql_utility_functions.py- Set operations, list operations, arithmetic, comparison, string, regex, document operationsType System & Validation Tests
test_woql_type_system.py- Type conversion, inference, custom types, validation, data types, coerciontest_woql_type.py- Type handling and type-related operationstest_woql_schema_validation.py- Schema validation, type checking, vocabulary loading, cursor wrapping, select/distinct validationBug Fixes
woql_query.pyline 355 - Fixed_data_value_listbug (incorrect method call:clean_data_value→_clean_data_value)woql_query.pylines 852-857 - Added defensive programming for And array initialization to prevent edge case failurestest_woql_path_operations.pyline 9 - Fixed pytest.skip syntax errortest_woql_query_builder.pylines 195-212 - Updated deprecated test implementationDiscovery on select() Design Change
The
select()predicate should likely take no arguments too as a valid case across both python and javascript client. The documentation is now updated.Comparison with JavaScript Client
When unsure, verified against the JavaScript client (
terminusdb-client-js) to ensure consistency:argsdiscovery and introspection/reflection is a better way to achieve the goal)Documentation Created
docs/KNOWN_ISSUES_AND_UNCOVERED_CODE.md- Comprehensive catalog of remaining issues, bugs, and uncovered code organized by severity and categoryNext Steps
To improve coverage and quality:
docs/KNOWN_ISSUES_AND_UNCOVERED_CODE.md_data_value_list()method after deprecation period