Skip to content

Commit c414b7d

Browse files
committed
Fix test files to use new cuda.core._* import paths
[UNTESTED] Update test files to access internal modules via cuda.core._* instead of cuda.core.experimental._*. This fixes test failures after the namespace migration.
1 parent 2e0da66 commit c414b7d

5 files changed

Lines changed: 8 additions & 8 deletions

File tree

cuda_core/tests/test_context.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
def test_context_init_disabled():
1010
with pytest.raises(RuntimeError, match=r"^Context objects cannot be instantiated directly\."):
11-
cuda.core.experimental._context.Context() # Ensure back door is locked.
11+
cuda.core._context.Context() # Ensure back door is locked.
1212

1313

1414
# ============================================================================

cuda_core/tests/test_device.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
def test_device_init_disabled():
1616
with pytest.raises(RuntimeError, match=r"^DeviceProperties cannot be instantiated directly\."):
17-
cuda.core.experimental._device.DeviceProperties() # Ensure back door is locked.
17+
cuda.core._device.DeviceProperties() # Ensure back door is locked.
1818

1919

2020
@pytest.fixture(scope="module")

cuda_core/tests/test_event.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
def test_event_init_disabled():
1919
with pytest.raises(RuntimeError, match=r"^Event objects cannot be instantiated directly\."):
20-
cuda.core.experimental._event.Event() # Ensure back door is locked.
20+
cuda.core._event.Event() # Ensure back door is locked.
2121

2222

2323
def test_timing_success(init_cuda):

cuda_core/tests/test_module.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,17 +41,17 @@ def cuda12_4_prerequisite_check():
4141

4242
def test_kernel_attributes_init_disabled():
4343
with pytest.raises(RuntimeError, match=r"^KernelAttributes cannot be instantiated directly\."):
44-
cuda.core.experimental._module.KernelAttributes() # Ensure back door is locked.
44+
cuda.core._module.KernelAttributes() # Ensure back door is locked.
4545

4646

4747
def test_kernel_occupancy_init_disabled():
4848
with pytest.raises(RuntimeError, match=r"^KernelOccupancy cannot be instantiated directly\."):
49-
cuda.core.experimental._module.KernelOccupancy() # Ensure back door is locked.
49+
cuda.core._module.KernelOccupancy() # Ensure back door is locked.
5050

5151

5252
def test_kernel_init_disabled():
5353
with pytest.raises(RuntimeError, match=r"^Kernel objects cannot be instantiated directly\."):
54-
cuda.core.experimental._module.Kernel() # Ensure back door is locked.
54+
cuda.core._module.Kernel() # Ensure back door is locked.
5555

5656

5757
def test_object_code_init_disabled():

cuda_core/tests/test_utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020

2121
def test_cast_to_3_tuple_success():
22-
c3t = cuda.core.experimental._utils.cuda_utils.cast_to_3_tuple
22+
c3t = cuda.core._utils.cuda_utils.cast_to_3_tuple
2323
assert c3t("", ()) == (1, 1, 1)
2424
assert c3t("", 2) == (2, 1, 1)
2525
assert c3t("", (2,)) == (2, 1, 1)
@@ -43,7 +43,7 @@ def test_cast_to_3_tuple_success():
4343
)
4444
def test_cast_to_3_tuple_value_error(cfg, expected):
4545
with pytest.raises(ValueError, match=expected):
46-
cuda.core.experimental._utils.cuda_utils.cast_to_3_tuple("Lbl", cfg)
46+
cuda.core._utils.cuda_utils.cast_to_3_tuple("Lbl", cfg)
4747

4848

4949
def convert_strides_to_counts(strides, itemsize):

0 commit comments

Comments
 (0)