def test_two_sorted_name(self, entry_points): entry_points.add(EntryPoint(name="b", value="b", group="c")) entry_points.add(EntryPoint(name="a", value="b", group="c")) expected = dedent("""\ [c] a = b b = b\n """) assert str(entry_points) == expected
def test_from_str_two_groups_simple(self): entry_points = EntryPoints.from_str( dedent("""\ [c] a = b [a] a = b\n\n\n """)) assert EntryPoint("a", "b", "a") in entry_points assert EntryPoint("a", "b", "c") in entry_points assert len(entry_points) == 2
def test_from_str_one_simple(self): entry_points = EntryPoints.from_str( dedent("""\ [baz] foo = bar """)) assert EntryPoint("foo", "bar", "baz") in entry_points assert len(entry_points) == 1
def test_one_with_attr(self, entry_points): entry_points.add(EntryPoint(name="foo", value="bar:quux", group="baz")) expected = dedent("""\ [baz] foo = bar:quux\n """) assert str(entry_points) == expected
def test_one_simple(self, entry_points): entry_points.add(EntryPoint(name="foo", value="bar", group="baz")) expected = dedent("""\ [baz] foo = bar\n """) assert str(entry_points) == expected
def wheelfile(self, buf): wf = WheelFile(buf, 'w', distname=self.distname, version=self.version) wf.entry_points.add(EntryPoint("foo", "bar", "baz")) wf.close() return wf