Skip to content

Commit eef276c

Browse files
Clean up BaseObjectWithBaseClassFields definition and related Python tests, and enable a Java test for circular dependency order.
1 parent 5dbc6c7 commit eef276c

File tree

4 files changed

+1
-20
lines changed

4 files changed

+1
-20
lines changed

src/test/java/com/regnosys/rosetta/generator/python/functions/PythonFunctionOrderTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ val string (1..1)
6565
* Test case for circular dependency order.
6666
*/
6767
@Test
68-
@Disabled("Circular dependencies are currently not supported and will cause a topological sort error or runtime NameError")
6968
public void testCircularDependencyOrder() {
7069
// Define ClassA that depends on ClassB, and ClassB that depends on ClassA.
7170
// This is a classic circular dependency which the topological sort cannot

src/test/java/com/regnosys/rosetta/generator/python/object/PythonCircularDependencyTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ class com_rosetta_test_model_CircularA(BaseDataClass):
149149
* Test case for inheritance circular dependency.
150150
* This test demonstrates a circular dependency via inheritance.
151151
*/
152+
// TODO: enable this test?
152153
@Test
153154
@Disabled("This currently generates an invalid order (Child before Parent) because the DAG ignores the cycle.")
154155
public void testInheritanceCircularDependency() {

test/python_unit_tests/features/functions/FunctionTest.rosetta

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -182,11 +182,6 @@ type BaseObject:
182182
value1 int (1..1)
183183
value2 int (1..1)
184184

185-
type BaseObjectWithBaseClassFields:
186-
value1 int (1..1)
187-
value2 int (1..1)
188-
strict boolean (1..1)
189-
190185
func TestSimpleObjectAssignment:
191186
inputs:
192187
baseObject BaseObject (1..1)

test/python_unit_tests/features/functions/test_functions_object_creation.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
"""test functions incomplete object return"""
22

3-
import pytest
4-
53
from rosetta_dsl.test.functions.BaseObject import BaseObject
6-
from rosetta_dsl.test.functions.BaseObjectWithBaseClassFields import (
7-
BaseObjectWithBaseClassFields,
8-
)
94

105
from rosetta_dsl.test.functions.TestSimpleObjectAssignment import (
116
TestSimpleObjectAssignment,
@@ -61,15 +56,6 @@ def test_container_object_creation_from_base_object():
6156
TestContainerObjectCreationFromBaseObject(baseObject=base_object, value3=20)
6257

6358

64-
@pytest.mark.skip(reason="Fails due to Pydantic validation of partial objects")
65-
def test_create_incomplete_object_succeeds_in_python():
66-
"""Test incomplete object return by setting strict=False in the function definition.
67-
This test is expected to pass.
68-
"""
69-
BaseObjectWithBaseClassFields(value1=5, strict=False)
70-
71-
72-
@pytest.mark.skip(reason="Fails due to Pydantic validation of partial objects")
7359
def test_complex_type_inputs():
7460
"""Test complex type inputs."""
7561
complex_type_a = ComplexTypeA(valueA=5)

0 commit comments

Comments
 (0)