Page MenuHomeSoftware Heritage

refactor and simplify test_cli as a pytest function
ClosedPublic

Authored by douardda on Sep 10 2020, 4:11 PM.

Details

Summary

Depends on D3910.

Diff Detail

Repository
rDGRPH Compressed graph representation
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Build is green

Patch application report for D3911 (id=13770)

Could not rebase; Attempt merge onto 8c937da207...

Updating 8c937da..c7df913
Fast-forward
 swh/graph/cli.py            | 94 ++++++++++++++++++++++++++++++++++++++-------
 swh/graph/tests/test_cli.py | 76 +++++++++++++-----------------------
 swh/graph/webgraph.py       | 45 ----------------------
 3 files changed, 106 insertions(+), 109 deletions(-)
Changes applied before test
commit c7df913df2b3a4163ecc58acdbaf5b86b5eb8f1a
Author: David Douard <david.douard@sdfa3.org>
Date:   Thu Sep 10 14:43:12 2020 +0200

    refactor and simplify test_cli as a pytest function

commit 4a643fcce445cc5efc3d1442092578e962363498
Author: David Douard <david.douard@sdfa3.org>
Date:   Thu Sep 10 10:56:11 2020 +0200

    cli: speedup the `swh` cli command startup time
    
    by moving import statements in functions. Also move the definition
    of StepOption in swh.graph.cli since it's purely a click dedicated
    class.
    
    Related to T2575.

See https://jenkins.softwareheritage.org/job/DGRPH/job/tests-on-diff/26/ for more details.

This revision was not accepted when it landed; it landed in state Needs Review.Sep 10 2020, 5:17 PM
This revision was automatically updated to reflect the committed changes.