test_bezier.py 692 B

1234567891011121314151617
  1. """
  2. Tests specific to the bezier module.
  3. """
  4. from matplotlib.bezier import inside_circle, split_bezier_intersecting_with_closedpath
  5. def test_split_bezier_with_large_values():
  6. # These numbers come from gh-27753
  7. arrow_path = [(96950809781500.0, 804.7503795623779),
  8. (96950809781500.0, 859.6242585800646),
  9. (96950809781500.0, 914.4981375977513)]
  10. in_f = inside_circle(96950809781500.0, 804.7503795623779, 0.06)
  11. split_bezier_intersecting_with_closedpath(arrow_path, in_f)
  12. # All we are testing is that this completes
  13. # The failure case is an infinite loop resulting from floating point precision
  14. # pytest will timeout if that occurs