Commits

David Schneider committed a8fb049

test for a tuple of mixed types

  • Participants
  • Parent commits 67fda46

Comments (0)

Files changed (1)

     py.test.raises(r.RPythonTypeError, "a.x = 1")
 
 def test_rpy_tuple():
+
+
+def test_rpy_mixed_tuple():
+    ttyp = r.get_rpy_type((int, float))
+    assert r.get_rpy_type((int, float)) is ttyp
+    ttyp.type_check((1, 2.0))
+    py.test.raises(r.RPythonTypeError, ttyp.type_check, (1, "abc"))
     ttyp = r.get_rpy_type((int, int))
     assert r.get_rpy_type((int, int)) is ttyp
     ttyp.type_check((1, 2))