def test_join_exceptions():
 a = symbol('a', 'var * {x: int}')
 b = symbol('b', 'var * {x: string}')
 with pytest.raises(TypeError) as excinfo:
  join(a, b, 'x')
 assert ('Schemata of joining columns do not match,' in str(excinfo.value))
 assert ('x=int32 and x=string' in str(excinfo.value))
 b = symbol('b', 'var * {z: int}')
 with pytest.raises(ValueError) as excinfo:
  join(a, b)
 assert ('No shared columns between a and b' in str(excinfo.value))
 b = symbol('b', 'var * {x: int}')
 with pytest.raises(ValueError) as excinfo:
  join(a, b, how='inner_')
 assert ('Got: inner_' in str(excinfo.value))

def test_join_exceptions ( ) : a = symbol ( 'a' , 'var * {x: int}' ) b = symbol ( 'b' , 'var * {x: string}' ) with pytest . raises ( TypeError ) as excinfo : join ( a , b , 'x' ) assert ( 'Schemata of joining columns do not match,' in str ( excinfo . value ) ) assert ( 'x=int32 and x=string' in str ( excinfo . value ) ) b = symbol ( 'b' , 'var * {z: int}' ) with pytest . raises ( ValueError ) as excinfo : join ( a , b ) assert ( 'No shared columns between a and b' in str ( excinfo . value ) ) b = symbol ( 'b' , 'var * {x: int}' ) with pytest . raises ( ValueError ) as excinfo : join ( a , b , how = 'inner_' ) assert ( 'Got: inner_' in str ( excinfo . value ) )
exception raised for mismatched schema; exception raised for no shared fields .