feat: update JUnit and Python unit tests to have same coverage as Rune-DSL - #254
Open
dschwartznyc wants to merge 1 commit into
Open
feat: update JUnit and Python unit tests to have same coverage as Rune-DSL#254dschwartznyc wants to merge 1 commit into
dschwartznyc wants to merge 1 commit into
Conversation
dschwartznyc
requested review from
davidalk,
hugohills-regnosys and
plamen-neykov
July 27, 2026 13:31
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.
Overview
Increases JUnit and Python unit test coverage in the Python generator to mirror the test suite in
rune-dsl. The branch adds dedicated test classes for expression categories that previously lacked explicit coverage, extends existing collection expression tests, and introduces a parallel set of Python unit tests that exercise the same features end-to-end through the generator and runtime.New JUnit Test Classes
PythonCountOperationTestcountlambda generation in function bodies, list literals, conditions, and field comparisonsPythonDeepPathTest->>) operator generation in conditions, feature calls, and inheritance hierarchiesPythonEmptyEvaluationTestabsent/existsevaluation, optional attribute defaults,Nonefallback in conditional expressionsPythonObjectExpressionTest...) syntax and list-literal initialisationPythonTypeAliasConditionTest@Disabledtest documents the known gap that conditions ontypeAliasdefinitions are not generatedExtended JUnit Test Classes
PythonCollectionExpressionTest— addedtestSortWithKeyExpressioncoveringsorted(..., key=lambda item: rune_resolve_attr(...))generation for sort operations with an explicit key attributeNew Python Unit Tests
Each entry is a Rune model paired with a pytest file that exercises generated code end-to-end.
Constructor.rosettatest_constructor.pyEmptyEvaluation.rosettatest_empty_evaluation.pyIsAbsent/IsPresentfunctions on optional boolean fields; all four absent/present combinationsTypeAliasCondition.rosettatest_type_alias_condition.pyINVALIDvalues are accepted without error (known gap)Extended Python Unit Tests
SortClosure.rosetta/test_sort_closure.py— addedSortItemsBySecondField(sort by a second attribute),SortIntegers(plain sort without a key), and assertions that all non-null items are preserved after sortingKnown Gap Documented
typeAliasconditions are not generated in Python. The generator strips all type aliases to their underlying primitive (str,int, etc.) and discards anyconditionblock on the alias. This affects codelist validation (FpMLCodingSchemeand its derivatives) and is tracked separately. The gap is documented inPythonTypeAliasConditionTest(@Disabled) andtest_type_alias_condition.py.