Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
will-cromar committed May 17, 2024
1 parent 7a18a76 commit 07acb39
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/test_devices.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,15 @@ def test_step(self):
with xla.step():
torch.ones((3, 3), device=xla.device())

self.assertEqual(met.counter_value('MarkStep'), 1)
self.assertEqual(met.counter_value('MarkStep'), 2)

def test_step_exception(self):
with self.assertRaisesRegex(RuntimeError, 'Expected error'):
with xla.step():
torch.ones((3, 3), device=xla.device())
raise RuntimeError('Expected error')

self.assertEqual(met.counter_value('MarkStep'), 1)
self.assertEqual(met.counter_value('MarkStep'), 2)

# Should roughly match example given in README
def test_trivial_model(self):
Expand Down

0 comments on commit 07acb39

Please sign in to comment.