You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
def test_more_complex(self):
student = ts.Unit(
"Student", attributes=[]
) # object type, specify data types through object type
race = student.nominal("Race", cardinality=5, exactly=1) # proper OOP
ses = student.numeric("SES")
test_score = student.nominal("Test score")
tutoring = student.nominal("treatment")
race.associates_with(test_score)
student.associates_with(test_score)
race.moderate(ses, on=test_score)
design = ts.Design(dv=test_score, ivs=[race, ses])
gr = design.graph
print(gr.get_nodes())
self.assertTrue(gr.has_variable(test_score))
the print will print an empty list, and the assertion will fail. This seems to be because graph.py requires relationships from tisane.og_variable instead of from tisane.variable, and tisane.design calls tisane.graph.Graph.add_relationship to add edges:
For example, if we take the following code:
the
print
will print an empty list, and the assertion will fail. This seems to be becausegraph.py
requires relationships fromtisane.og_variable
instead of fromtisane.variable
, andtisane.design
callstisane.graph.Graph.add_relationship
to add edges:The types for
relationship
are imported fromtisane.og_variable
, which means that none of the relationships are added as edges.The text was updated successfully, but these errors were encountered: