MCPcopy Create free account
hub / github.com/pytorch/pytorch / test_repr

Method test_repr

test/test_datapipe.py:265–272  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

263 _ = pickle.loads(pickle.dumps(wrap_fd))
264
265 def test_repr(self):
266 fd = TestStreamWrapper._FakeFD("")
267 wrap_fd = StreamWrapper(fd)
268 self.assertEqual(str(wrap_fd), "StreamWrapper<FakeFD>")
269
270 with tempfile.TemporaryFile() as f:
271 wrap_f = StreamWrapper(f)
272 self.assertEqual(str(wrap_f), "StreamWrapper<" + str(f) + ">")
273
274
275class TestIterableDataPipeBasic(TestCase):

Callers

nothing calls this directly

Calls 2

StreamWrapperClass · 0.90
assertEqualMethod · 0.45

Tested by

no test coverage detected