|
1 | 1 | import inspect
|
2 | 2 | import math
|
3 | 3 | import re
|
| 4 | +from dataclasses import dataclass |
4 | 5 | from typing import (
|
5 | 6 | Callable,
|
6 | 7 | Dict,
|
|
15 | 16 | from warnings import warn
|
16 | 17 |
|
17 | 18 | import pytest
|
18 |
| -from attr import dataclass |
19 | 19 | from hypothesis import HealthCheck, assume, given, settings
|
20 | 20 |
|
21 | 21 | from . import dtype_helpers as dh
|
@@ -524,13 +524,28 @@ def __call__(self, groups: Tuple[str, ...]) -> BinaryCase:
|
524 | 524 | AndCondFactory(ValueCondFactory("i1", 0), ValueCondFactory("i2", 1)),
|
525 | 525 | ResultCheckFactory(2),
|
526 | 526 | ),
|
527 |
| - # re.compile( |
528 |
| - # "If ``x2_i`` is (.+), the result is (.+), even if ``x1_i`` is .+" |
529 |
| - # ): lambda v: lambda _, i2: make_eq(v)(i2), |
530 |
| - # re.compile( |
531 |
| - # "If ``x1_i`` is (.+), ``x1_i`` (.+), " |
532 |
| - # "and ``x2_i`` is (.+), the result is (.+)" |
533 |
| - # ) |
| 527 | + re.compile( |
| 528 | + "If ``x1_i`` is (.+), ``x1_i`` (.+), " |
| 529 | + "and ``x2_i`` is (.+), the result is (.+)" |
| 530 | + ): BinaryCaseFactory( |
| 531 | + AndCondFactory( |
| 532 | + ValueCondFactory("i1", 0), |
| 533 | + ValueCondFactory("i1", 1), |
| 534 | + ValueCondFactory("i2", 2), |
| 535 | + ), |
| 536 | + ResultCheckFactory(3), |
| 537 | + ), |
| 538 | + re.compile( |
| 539 | + "If ``x1_i`` is (.+), ``x2_i`` (.+), " |
| 540 | + "and ``x2_i`` is (.+), the result is (.+)" |
| 541 | + ): BinaryCaseFactory( |
| 542 | + AndCondFactory( |
| 543 | + ValueCondFactory("i1", 0), |
| 544 | + ValueCondFactory("i2", 1), |
| 545 | + ValueCondFactory("i2", 2), |
| 546 | + ), |
| 547 | + ResultCheckFactory(3), |
| 548 | + ), |
534 | 549 | # re.compile(
|
535 | 550 | # r"If `abs\(x1_i\)` is greater than (.+) and ``x2_i`` is (.+), "
|
536 | 551 | # "the result is (.+)"
|
@@ -560,6 +575,9 @@ def __call__(self, groups: Tuple[str, ...]) -> BinaryCase:
|
560 | 575 | rf"{r_result_sign.pattern} , unless the result is (.+)\. If the result "
|
561 | 576 | r"is ``NaN``, the \"sign\" of ``NaN`` is implementation-defined\."
|
562 | 577 | ): BinaryCaseFactory(SignCondFactory(0), ResultSignCheckFactory(1)),
|
| 578 | + re.compile( |
| 579 | + "If ``x2_i`` is (.+), the result is (.+), even if ``x1_i`` is .+" |
| 580 | + ): BinaryCaseFactory(ValueCondFactory("i2", 0), ResultCheckFactory(1)), |
563 | 581 | }
|
564 | 582 |
|
565 | 583 |
|
|
0 commit comments