def test_arguments():
 from sympy import subsets
 singles2d = ((1, 2), [1, 3], Point(1, 5))
 doubles2d = subsets(singles2d, 2)
 l2d = Line(Point2D(1, 2), Point2D(2, 3))
 singles3d = ((1, 2, 3), [1, 2, 4], Point(1, 2, 6))
 doubles3d = subsets(singles3d, 2)
 l3d = Line(Point3D(1, 2, 3), Point3D(1, 1, 2))
 singles4d = ((1, 2, 3, 4), [1, 2, 3, 5], Point(1, 2, 3, 7))
 doubles4d = subsets(singles4d, 2)
 l4d = Line(Point(1, 2, 3, 4), Point(2, 2, 2, 2))
 test_single = ['contains', 'distance', 'equals', 'parallel_line', 'perpendicular_line', 'perpendicular_segment', 'projection', 'intersection']
 for p in doubles2d:
  Line2D(*p)
 for func in test_single:
  for p in singles2d:
   getattr(l2d, func)(p)
 for p in doubles3d:
  Line3D(*p)
 for func in test_single:
  for p in singles3d:
   getattr(l3d, func)(p)
 for p in doubles4d:
  Line(*p)
 for func in test_single:
  for p in singles4d:
   getattr(l4d, func)(p)

def test_arguments ( ) : from sympy import subsets singles2d = ( ( 1 , 2 ) , [ 1 , 3 ] , Point ( 1 , 5 ) ) doubles2d = subsets ( singles2d , 2 ) l2d = Line ( Point2D ( 1 , 2 ) , Point2D ( 2 , 3 ) ) singles3d = ( ( 1 , 2 , 3 ) , [ 1 , 2 , 4 ] , Point ( 1 , 2 , 6 ) ) doubles3d = subsets ( singles3d , 2 ) l3d = Line ( Point3D ( 1 , 2 , 3 ) , Point3D ( 1 , 1 , 2 ) ) singles4d = ( ( 1 , 2 , 3 , 4 ) , [ 1 , 2 , 3 , 5 ] , Point ( 1 , 2 , 3 , 7 ) ) doubles4d = subsets ( singles4d , 2 ) l4d = Line ( Point ( 1 , 2 , 3 , 4 ) , Point ( 2 , 2 , 2 , 2 ) ) test_single = [ 'contains' , 'distance' , 'equals' , 'parallel_line' , 'perpendicular_line' , 'perpendicular_segment' , 'projection' , 'intersection' ] for p in doubles2d : Line2D ( * p ) for func in test_single : for p in singles2d : getattr ( l2d , func ) ( p ) for p in doubles3d : Line3D ( * p ) for func in test_single : for p in singles3d : getattr ( l3d , func ) ( p ) for p in doubles4d : Line ( * p ) for func in test_single : for p in singles4d : getattr ( l4d , func ) ( p )
test to ensure hug introspection can correctly pull out arguments from a function definition .