def test_dotted_name(self): self.assertEqual(dotted_name(["hello", "world"]), "hello.world") self.assertEqual(dotted_name(["foo", ["bar", "baz"], "boom"]), "foo.bar.baz.boom") self.assertEqual(dotted_name(["foo", ("bar", "baz"), "boom"]), "foo.bar.baz.boom") self.assertEqual(dotted_name([1, 2, 3]), "1.2.3") self.assertEqual(dotted_name("right"), "right")
def test_dotted_name_assert(self, names): dotted_name(names)
def test_dotted_name(self, names, expected): self.assertEqual(dotted_name(names), expected)