Skip to content

Shadowed test fails to run #243

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
erooke opened this issue Apr 25, 2022 · 0 comments
Open

Shadowed test fails to run #243

erooke opened this issue Apr 25, 2022 · 0 comments

Comments

@erooke
Copy link
Contributor

erooke commented Apr 25, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant