Skip to content

Commit

Permalink
Change requested by
Browse files Browse the repository at this point in the history
  • Loading branch information
fyellin committed Oct 7, 2024
1 parent 42d5ad5 commit 085a178
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
11 changes: 7 additions & 4 deletions tests_mem/testutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,10 +218,13 @@ def core_test_func():
# Test that everything that's a subclass of GPUObjectBase has a device
# in its _device field.
if issubclass(cls, GPUObjectBase):
assert all(
isinstance(objects[i]._device, GPUDevice)
for i in range(len(objects))
)
if issubclass(cls, GPUDevice):
assert all(objects[i]._device is None for i in range(len(objects)))
else:
assert all(
isinstance(objects[i]._device, GPUDevice)
for i in range(len(objects))
)

# Test that class matches function name (should prevent a group of copy-paste errors)
assert ob_name == cls.__name__[3:]
Expand Down
2 changes: 1 addition & 1 deletion wgpu/_classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -701,7 +701,7 @@ class GPUDevice(GPUObjectBase):
"""

def __init__(self, label, internal, adapter, features, limits, queue):
super().__init__(label, internal, self)
super().__init__(label, internal, None)

assert isinstance(adapter, GPUAdapter)
assert isinstance(features, set)
Expand Down

0 comments on commit 085a178

Please sign in to comment.