def test_struct_ctor_pos(self): r = wfn.Rational(2, 4) self.assertEqual(r.Numerator, 2) self.assertEqual(r.Denominator, 4)
def test_struct_ctor_mix(self): r = wfn.Rational(3, Denominator=6) self.assertEqual(r.Numerator, 3) self.assertEqual(r.Denominator, 6)
def test_struct_ctor_dict(self): r = wfn.Rational({"Denominator": 2, "Numerator": 4}) self.assertEqual(r.Numerator, 4) self.assertEqual(r.Denominator, 2)
def test_struct_ctor_kwd(self): r = wfn.Rational(Denominator=2, Numerator=4) self.assertEqual(r.Numerator, 4) self.assertEqual(r.Denominator, 2)