<commit_before># Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

from __future__ import absolute_import

import itertools
import operator

import numpy as np
import pytest
import six

from bezier import _implicitization
from bezier import _intersection_helpers
import bezier.curve

import runtime_utils
from runtime_utils import CurveIntersectionType


SPACING = np.spacing  # pylint: disable=no-member
CONFIG = runtime_utils.Config()
GEOMETRIC = bezier.curve.IntersectionStrategy.geometric
ALGEBRAIC = bezier.curve.IntersectionStrategy.algebraic
S_PROP = operator.attrgetter('s')
_, INTERSECTIONS = runtime_utils.curve_intersections_info()
INCORRECT_VALUES_MSG = """\
Multipliers were:
{}

However, the actual observed (ULP relative) errors were:
{}

The issue seems to be in the following index pair(s):
{}
"""
ULPS_ALLOWED = 3.0
# NOTE: Set a threshold for values that are "approximately" zero.
#       This is an **absolute** error rather than a relative error
#       since relative to zero error is always infinite.
ZERO_THRESHOLD = 0.5**52
ZERO_MISS = object()
# NOTE: We use units of least precision (ULP) as error. These
#       are for the very rare cases where the computed values
#       differ from the actual values by more than 3 ULPs.
ULPS_ALLOWED_OVERRIDE = {
    GEOMETRIC: {
        12: {<commit_msg>Removing unused `CONFIG` in `test_curve_curve`.<commit_after># Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

from __future__ import absolute_import

import itertools
import operator

import numpy as np
import pytest
import six

from bezier import _implicitization
from bezier import _intersection_helpers
import bezier.curve

import runtime_utils
from runtime_utils import CurveIntersectionType


SPACING = np.spacing  # pylint: disable=no-member
GEOMETRIC = bezier.curve.IntersectionStrategy.geometric
ALGEBRAIC = bezier.curve.IntersectionStrategy.algebraic
S_PROP = operator.attrgetter('s')
_, INTERSECTIONS = runtime_utils.curve_intersections_info()
INCORRECT_VALUES_MSG = """\
Multipliers were:
{}

However, the actual observed (ULP relative) errors were:
{}

The issue seems to be in the following index pair(s):
{}
"""
ULPS_ALLOWED = 3.0
# NOTE: Set a threshold for values that are "approximately" zero.
#       This is an **absolute** error rather than a relative error
#       since relative to zero error is always infinite.
ZERO_THRESHOLD = 0.5**52
ZERO_MISS = object()
# NOTE: We use units of least precision (ULP) as error. These
#       are for the very rare cases where the computed values
#       differ from the actual values by more than 3 ULPs.
ULPS_ALLOWED_OVERRIDE = {
    GEOMETRIC: {
        12: {
{'fraction_non_alphanumeric': 0.0691079295154185, 'fraction_numerical': 0.007158590308370044, 'mean_word_length': 4.471385542168675, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4806296', 'n_tokens_mistral': 1063, 'n_tokens_neox': 1028, 'n_words': 430}