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

Method test_default_namespace

tools/test/test_utils.py:12–16  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

10 self.assertEqual(helper.get_cpp_namespace(), "aten")
11
12 def test_default_namespace(self) -> None:
13 helper = NamespaceHelper.from_namespaced_entity("add")
14 self.assertEqual(helper.entity_name, "add")
15 self.assertEqual(helper.get_cpp_namespace(), "")
16 self.assertEqual(helper.get_cpp_namespace("default"), "default")
17
18 def test_namespace_levels_more_than_max(self) -> None:
19 with self.assertRaises(AssertionError):

Callers

nothing calls this directly

Calls 3

get_cpp_namespaceMethod · 0.80
assertEqualMethod · 0.45

Tested by

no test coverage detected