|
17 | 17 |
|
18 | 18 | import httpx
|
19 | 19 | import pytest
|
| 20 | +import packaging.version as version |
20 | 21 | from respx import MockRouter
|
21 | 22 | from pydantic import ValidationError
|
22 | 23 |
|
@@ -643,6 +644,10 @@ def test_absolute_request_url(self, client: Finch) -> None:
|
643 | 644 | )
|
644 | 645 | assert request.url == "https://myapi.com/foo"
|
645 | 646 |
|
| 647 | + @pytest.mark.skipif( |
| 648 | + version.parse(httpx.__version__) >= version.parse("0.28.0"), |
| 649 | + reason="Test is only relevant for httpx versions < 0.28.0", |
| 650 | + ) |
646 | 651 | def test_transport_option_is_deprecated(self) -> None:
|
647 | 652 | with pytest.warns(
|
648 | 653 | DeprecationWarning,
|
@@ -672,6 +677,10 @@ def test_transport_option_mutually_exclusive_with_http_client(self) -> None:
|
672 | 677 | http_client=http_client,
|
673 | 678 | )
|
674 | 679 |
|
| 680 | + @pytest.mark.skipif( |
| 681 | + version.parse(httpx.__version__) >= version.parse("0.28.0"), |
| 682 | + reason="Test is only relevant for httpx versions < 0.28.0", |
| 683 | + ) |
675 | 684 | def test_connection_pool_limits_option_is_deprecated(self) -> None:
|
676 | 685 | with pytest.warns(
|
677 | 686 | DeprecationWarning,
|
@@ -709,6 +718,10 @@ def test_connection_pool_limits_option_mutually_exclusive_with_http_client(self)
|
709 | 718 | http_client=http_client,
|
710 | 719 | )
|
711 | 720 |
|
| 721 | + @pytest.mark.skipif( |
| 722 | + version.parse(httpx.__version__) >= version.parse("0.28.0"), |
| 723 | + reason="Test is only relevant for httpx versions < 0.28.0", |
| 724 | + ) |
712 | 725 | def test_proxies_option_is_deprecated(self) -> None:
|
713 | 726 | with pytest.warns(
|
714 | 727 | DeprecationWarning,
|
@@ -1527,6 +1540,10 @@ def test_absolute_request_url(self, client: AsyncFinch) -> None:
|
1527 | 1540 | )
|
1528 | 1541 | assert request.url == "https://myapi.com/foo"
|
1529 | 1542 |
|
| 1543 | + @pytest.mark.skipif( |
| 1544 | + version.parse(httpx.__version__) >= version.parse("0.28.0"), |
| 1545 | + reason="Test is only relevant for httpx versions < 0.28.0", |
| 1546 | + ) |
1530 | 1547 | def test_transport_option_is_deprecated(self) -> None:
|
1531 | 1548 | with pytest.warns(
|
1532 | 1549 | DeprecationWarning,
|
@@ -1556,6 +1573,10 @@ async def test_transport_option_mutually_exclusive_with_http_client(self) -> Non
|
1556 | 1573 | http_client=http_client,
|
1557 | 1574 | )
|
1558 | 1575 |
|
| 1576 | + @pytest.mark.skipif( |
| 1577 | + version.parse(httpx.__version__) >= version.parse("0.28.0"), |
| 1578 | + reason="Test is only relevant for httpx versions < 0.28.0", |
| 1579 | + ) |
1559 | 1580 | def test_connection_pool_limits_option_is_deprecated(self) -> None:
|
1560 | 1581 | with pytest.warns(
|
1561 | 1582 | DeprecationWarning,
|
@@ -1593,6 +1614,10 @@ async def test_connection_pool_limits_option_mutually_exclusive_with_http_client
|
1593 | 1614 | http_client=http_client,
|
1594 | 1615 | )
|
1595 | 1616 |
|
| 1617 | + @pytest.mark.skipif( |
| 1618 | + version.parse(httpx.__version__) >= version.parse("0.28.0"), |
| 1619 | + reason="Test is only relevant for httpx versions < 0.28.0", |
| 1620 | + ) |
1596 | 1621 | def test_proxies_option_is_deprecated(self) -> None:
|
1597 | 1622 | with pytest.warns(
|
1598 | 1623 | DeprecationWarning,
|
|
0 commit comments