Page MenuHomeSoftware Heritage

test_nixguix: Simplify the nixguix specific check_snapshot function
ClosedPublic

Authored by ardumont on Jul 17 2020, 11:37 AM.

Diff Detail

Repository
rDLDBASE Generic VCS/Package Loader
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 D3548 (id=12512)

Rebasing onto 5acfe7479a...

Current branch diff-target is up to date.
Changes applied before test
commit 0505a69d5fc9a6a69e142fa3fd5332a27c261d77
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Fri Jul 17 11:36:49 2020 +0200

    test_nixguix: Explicit the evaluation branch's specific case

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

<mode=nitpciky>should be a comment, not a docstring </mode>

<mode=nitpciky>should be a comment, not a docstring </mode>

lol, that's cool, better agree to avoid modifying stuff on/off all the time heh.

I made it a docstring so it serves the purpose to also explain the allow_empty
parameter with such value (just above the docstring ;)

So with that in mind, is that ok as-is now?

<mode=nitpciky>should be a comment, not a docstring </mode>

lol, that's cool, better agree to avoid modifying stuff on/off all the time heh.

I made it a docstring so it serves the purpose to also explain the allow_empty
parameter with such value (just above the docstring ;)

So with that in mind, is that ok as-is now?

Ok so in fact, the problem is that this should really be a comment, and the check_snapshot() defined in there should not accept the allowed_empty argument. Here you have a consistent behavior of the check_snapshot() only because the allowed_empty has a default value and is never set by a caller. So it's confusing and error-prone IMHO.

Not so nitpicly in the end :-)

  • Rework function following discussion
  • make docstring a comment

Build is green

Patch application report for D3548 (id=12519)

Rebasing onto 5acfe7479a...

Current branch diff-target is up to date.
Changes applied before test
commit 0757e8dd4b32c6bcfa30dc8c0607b1f5aba65bd4
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Fri Jul 17 11:36:49 2020 +0200

    test_nixguix: Simplify the nixguix specific check_snapshot function
    
    And explicit the evaluation branch's specific case as comment

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

ardumont retitled this revision from test_nixguix: Explicit the evaluation branch's specific case to test_nixguix: Simplify the nixguix specific check_snapshot function.Jul 17 2020, 12:53 PM
This revision is now accepted and ready to land.Jul 17 2020, 12:56 PM

Build is green

Patch application report for D3548 (id=12520)

Rebasing onto 5acfe7479a...

Current branch diff-target is up to date.
Changes applied before test
commit ccfeb3525d347f83956fabb24179484a2338e305
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Fri Jul 17 11:36:49 2020 +0200

    test_nixguix: Simplify the nixguix specific check_snapshot function
    
    And explicit the evaluation branch's specific case as comment

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