File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -240,6 +240,9 @@ def get_constraints(self):
240
240
else :
241
241
constraints .append (deepcopy (constraint ))
242
242
243
+ for table_name , synthesizer in self ._table_synthesizers .items ():
244
+ constraints += synthesizer .get_constraints ()
245
+
243
246
return constraints
244
247
245
248
def validate_constraints (self , synthetic_data ):
Original file line number Diff line number Diff line change @@ -1563,6 +1563,14 @@ def test_get_constraint(self, copy_mock):
1563
1563
constraint2 = Mock ()
1564
1564
custom_constraint = Mock ()
1565
1565
constraint3 = ProgrammableConstraintHarness (custom_constraint )
1566
+ constraint4 = Mock ()
1567
+ constraint5 = Mock ()
1568
+ instance ._table_synthesizers = {
1569
+ 'table1' : Mock (),
1570
+ 'table2' : Mock (),
1571
+ }
1572
+ instance ._table_synthesizers ['table1' ].get_constraints = Mock (return_value = [constraint4 ])
1573
+ instance ._table_synthesizers ['table2' ].get_constraints = Mock (return_value = [constraint5 ])
1566
1574
1567
1575
# Run
1568
1576
no_constraints = BaseMultiTableSynthesizer .get_constraints (instance )
@@ -1576,6 +1584,8 @@ def test_get_constraint(self, copy_mock):
1576
1584
copy_mock .return_value ,
1577
1585
copy_mock .return_value ,
1578
1586
copy_mock .return_value ,
1587
+ constraint4 ,
1588
+ constraint5 ,
1579
1589
]
1580
1590
1581
1591
def test_get_metadata_original (self ):
You can’t perform that action at this time.
0 commit comments