mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Fix unused Python variables in test/[e-z]* (#136964)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/136964 Approved by: https://github.com/justinchuby, https://github.com/albanD
This commit is contained in:
committed by
PyTorch MergeBot
parent
d298bd840f
commit
d8c8ba2440
@ -409,11 +409,11 @@ class TestTensorBoardSummary(BaseTestCase):
|
||||
)
|
||||
|
||||
def test_list_input(self):
|
||||
with self.assertRaises(Exception) as e_info:
|
||||
with self.assertRaises(Exception):
|
||||
summary.histogram("dummy", [1, 3, 4, 5, 6], "tensorflow")
|
||||
|
||||
def test_empty_input(self):
|
||||
with self.assertRaises(Exception) as e_info:
|
||||
with self.assertRaises(Exception):
|
||||
summary.histogram("dummy", np.ndarray(0), "tensorflow")
|
||||
|
||||
def test_image_with_boxes(self):
|
||||
@ -766,7 +766,7 @@ class TestTensorBoardPytorchGraph(BaseTestCase):
|
||||
w.add_graph(myMLP(), dummy_input)
|
||||
|
||||
def test_wrong_input_size(self):
|
||||
with self.assertRaises(RuntimeError) as e_info:
|
||||
with self.assertRaises(RuntimeError):
|
||||
dummy_input = torch.rand(1, 9)
|
||||
model = torch.nn.Linear(3, 5)
|
||||
with self.createSummaryWriter() as w:
|
||||
@ -867,7 +867,7 @@ class TestTensorBoardNumpy(BaseTestCase):
|
||||
|
||||
def test_pytorch_np_expect_fail(self):
|
||||
with self.assertRaises(NotImplementedError):
|
||||
res = make_np({"pytorch": 1.0})
|
||||
make_np({"pytorch": 1.0})
|
||||
|
||||
|
||||
class TestTensorProtoSummary(BaseTestCase):
|
||||
|
||||
Reference in New Issue
Block a user