Skip to content

Shadowed test fails to run #243

@erooke

Description

@erooke

The following test is never run:

def test_format_meta(self):
mapper = KeplerMapper()
data = np.random.rand(1000, 10)
lens = mapper.fit_transform(data, projection=[0])
graph = mapper.map(lens, data)
color_function_name = ["Row number"]
fmt = _format_meta(graph, color_function_name)
assert fmt["n_nodes"] == len(graph["nodes"])
assert "n_edges" in fmt.keys()
assert "n_total" in fmt.keys()
del fmt["custom_meta"]
vals = fmt.values()
for v in vals:
assert isinstance(v, numbers.Number)

It isn't run as it is shadowed by this test later in the file:

def test_format_meta(self, sc):
mapper_summary = _format_meta(sc, "foo", "bar", "Nada custom meta")
assert mapper_summary["custom_meta"] == "Nada custom meta"
assert (
mapper_summary["n_total"] <= 300 and mapper_summary["n_total"] >= 200
), "Some points become repeated in multiple nodes."

Additionally if one changes the first tests name it fails to pass.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions