MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / testTensorDir

Method testTensorDir

tensorflow/python/eager/tensor_test.py:507–517  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

505
506 @test_util.assert_no_new_pyobjects_executing_eagerly
507 def testTensorDir(self):
508 t = array_ops.zeros(1)
509 t.test_attr = "Test"
510
511 instance_dir = dir(t)
512 type_dir = dir(ops.EagerTensor)
513
514 # Monkey patched attributes should show up in dir(t)
515 self.assertIn("test_attr", instance_dir)
516 instance_dir.remove("test_attr")
517 self.assertEqual(instance_dir, type_dir)
518
519 def testNonRectangularPackAsConstant(self):
520 l = [array_ops.zeros((10, 1)).numpy(), array_ops.zeros(1).numpy()]

Callers

nothing calls this directly

Calls 1

removeMethod · 0.45

Tested by

no test coverage detected