Skip to content

Conversation

nahumsa
Copy link
Contributor

@nahumsa nahumsa commented Mar 27, 2021

Closes #183.

Creates a cohesive structure for tests by splitting class tests into folders, all PyGraph class tests are in the tests/graph folder and all PyDiGraph/PyDAG tests are in the tests/DiGraph folder. As before, all retworkx.generators tests are in the tests/generators folder.

There are two exceptions:

  • test_dispatch.py is in the tests folder because it tests both PyGraph and PyDigraph and moving this test to separate folders would lead to duplicated code.
  • test_random.py is in the tests folder because it is similar to generators and generates random graphs, however they are not in the generators module, so I was unsure if it is needed to create a random folder to put this kind of tests.

@coveralls
Copy link

coveralls commented Mar 27, 2021

Pull Request Test Coverage Report for Build 704737619

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 96.633%

Totals Coverage Status
Change from base Build 704711968: 0.0%
Covered Lines: 6055
Relevant Lines: 6266

💛 - Coveralls

Copy link
Member

@mtreinish mtreinish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This LGTM, thanks for doing this! The only nitpick I have is instead of tests/DiGraph could we name that directory tests/digraph?

@nahumsa
Copy link
Contributor Author

nahumsa commented Mar 27, 2021

This LGTM, thanks for doing this! The only nitpick I have is instead of tests/DiGraph could we name that directory tests/digraph?

Sure.

Copy link
Member

@mtreinish mtreinish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thanks for the quick update. This LGTM, I especially appreciate you catching things like test_unique_neighbors_on_graphs which was put in the wrong file (even though the test_neighbors files were already split). Heh, if I had done this I would have completely missed that and just left it in digraph/test_neighbors.

Before I merge this PR though we should give a heads up to @georgios-ts @IvanIsCoding @Chriscrosser3310 and @jlapeyre (which hopefully this comment will be sufficient for) who all have open PRs as this will require them to rebase and move the tests into the new consistent directory structure.

@mtreinish mtreinish merged commit 34a2cb0 into Qiskit:master Mar 31, 2021
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

Successfully merging this pull request may close these issues.

Cleanup test organization
3 participants