Skip to content

Commit

Permalink
Fix PLR0124 (#2422)
Browse files Browse the repository at this point in the history
* Ignore PLR0124

* Circumvent PLR0124
  • Loading branch information
ashnair1 committed Jun 29, 2023
1 parent 1b408b0 commit 216db41
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions test/core/test_tensor_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ def test_accessors(self, device, dtype):
def test_unary_ops(self, device, dtype):
data = torch.rand(2, device=device, dtype=dtype)
x = TensorWrapper(data)
x1 = TensorWrapper(data)
x2 = TensorWrapper(data)

self.assert_close(x.add(x), x + x)
self.assert_close(x.add(1), 1 + x)
Expand All @@ -78,12 +80,12 @@ def test_unary_ops(self, device, dtype):
self.assert_close(x.div(x), x / x)
self.assert_close(x.true_divide(x), x / x)
self.assert_close(x.floor_divide(x), x // x)
self.assert_close(x.ge(x), x >= x)
self.assert_close(x.gt(x), x > x)
self.assert_close(x.lt(x), x < x)
self.assert_close(x.le(x), x <= x)
self.assert_close(x.eq(x), x == x)
self.assert_close(x.ne(x), x != x)
self.assert_close(x1.ge(x2), x1 >= x2)
self.assert_close(x1.gt(x2), x1 > x2)
self.assert_close(x1.lt(x2), x1 < x2)
self.assert_close(x1.le(x2), x1 <= x2)
self.assert_close(x1.eq(x2), x1 == x2)
self.assert_close(x1.ne(x2), x1 != x2)
self.assert_close(-x, -data)

def test_callable(self, device, dtype):
Expand Down

0 comments on commit 216db41

Please sign in to comment.