|
13 | 13 | from ._helpers import import_, all_libraries, wrapped_libraries |
14 | 14 |
|
15 | 15 | @pytest.mark.parametrize("use_compat", [True, False, None]) |
16 | | -@pytest.mark.parametrize("api_version", [None, "2021.12", "2022.12"]) |
| 16 | +@pytest.mark.parametrize("api_version", [None, "2021.12", "2022.12", "2023.12"]) |
17 | 17 | @pytest.mark.parametrize("library", all_libraries + ['array_api_strict']) |
18 | 18 | def test_array_namespace(library, api_version, use_compat): |
19 | 19 | xp = import_(library) |
@@ -94,14 +94,20 @@ def test_array_namespace_errors_torch(): |
94 | 94 | def test_api_version(): |
95 | 95 | x = torch.asarray([1, 2]) |
96 | 96 | torch_ = import_("torch", wrapper=True) |
97 | | - assert array_namespace(x, api_version="2022.12") == torch_ |
| 97 | + assert array_namespace(x, api_version="2023.12") == torch_ |
98 | 98 | assert array_namespace(x, api_version=None) == torch_ |
99 | 99 | assert array_namespace(x) == torch_ |
100 | 100 | # Should issue a warning |
101 | 101 | with warnings.catch_warnings(record=True) as w: |
102 | 102 | assert array_namespace(x, api_version="2021.12") == torch_ |
103 | | - assert len(w) == 1 |
104 | | - assert "2021.12" in str(w[0].message) |
| 103 | + assert len(w) == 1 |
| 104 | + assert "2021.12" in str(w[0].message) |
| 105 | + |
| 106 | + # Should issue a warning |
| 107 | + with warnings.catch_warnings(record=True) as w: |
| 108 | + assert array_namespace(x, api_version="2022.12") == torch_ |
| 109 | + assert len(w) == 1 |
| 110 | + assert "2022.12" in str(w[0].message) |
105 | 111 |
|
106 | 112 | pytest.raises(ValueError, lambda: array_namespace(x, api_version="2020.12")) |
107 | 113 |
|
|
0 commit comments