Skip to content
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

pythonPackages.topydo: Don't fail build on tests #98110

Merged
merged 1 commit into from Sep 16, 2020
Merged

Conversation

@Pamplemousse
Copy link
Member

Pamplemousse commented Sep 16, 2020

Motivation for this change

Get topydo to build.
ZHF: #97479

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

Signed-off-by: Pamplemousse xav.maso@gmail.com

@risicle
Copy link
Contributor

risicle commented Sep 16, 2020

If you're going to disable tests could you add a pythonImportsCheck to this package, so it's not completely unchecked?

@Pamplemousse Pamplemousse force-pushed the Pamplemousse:topydo branch from d5a289d to 6259567 Sep 16, 2020
@risicle
Copy link
Contributor

risicle commented Sep 16, 2020

One failing test has been reported multiple times upstream without result

Does it not work doing a

  substituteInPlace tests/test_something.py --replace 'test_foo_bar' 'dont_test_foo_bar'

?

Many test runners detect their tests through the naming scheme.

(In fact, are you actually sure you need to use green at all? They look like pretty plain unittest tests which can be run a la python -m unittest tests/)

@Pamplemousse
Copy link
Member Author

Pamplemousse commented Sep 16, 2020

@risicle: My bad, this is an application, not a package!
Is it still relevant to add a pythonImportsCheck?

@risicle
Copy link
Contributor

risicle commented Sep 16, 2020

Probably ... not ... really 🤔

@risicle
Copy link
Contributor

risicle commented Sep 16, 2020

But I still think you can rescue the actual tests.

@Pamplemousse Pamplemousse force-pushed the Pamplemousse:topydo branch from 6259567 to e9d4e4b Sep 16, 2020
@Pamplemousse
Copy link
Member Author

Pamplemousse commented Sep 16, 2020

@risicle: You are right, green seems a bit superfluous (and so seems coverage in that case)...
I wanted to stay close to the way upstream to do it in their CI (see .travis.yml).

Could not find a way to exclude the test only using unittest (because it's not a runner 🤔), so I used pytest.

@risicle
Copy link
Contributor

risicle commented Sep 16, 2020

Did the test-method-renaming approach not work? We do it in loads of places and it works well.

@Pamplemousse Pamplemousse force-pushed the Pamplemousse:topydo branch from e9d4e4b to 87b7f71 Sep 16, 2020
@risicle
Copy link
Contributor

risicle commented Sep 16, 2020

Here ya go, WFM:

checkPhase = ''
  python -m unittest discover
'';

no green needed.

@Pamplemousse
Copy link
Member Author

Pamplemousse commented Sep 16, 2020

Woops, misclick...

Signed-off-by: Pamplemousse <xav.maso@gmail.com>
@Pamplemousse Pamplemousse force-pushed the Pamplemousse:topydo branch from 87b7f71 to c603f62 Sep 16, 2020
@risicle
Copy link
Contributor

risicle commented Sep 16, 2020

@ofborg build topydo

@risicle
Copy link
Contributor

risicle commented Sep 16, 2020

WFM linux x86_64 too.

@risicle risicle merged commit cbe0b2e into NixOS:master Sep 16, 2020
5 of 6 checks passed
5 of 6 checks passed
tests tests
Details
action
Details
grahamcofborg-eval Checking original out paths
Details
topydo on aarch64-linux No attempt
Details
Wait for ofborg
Details
topydo on x86_64-linux Success
Details
@Pamplemousse
Copy link
Member Author

Pamplemousse commented Sep 16, 2020

Thanks for you help @risicle!

@risicle
Copy link
Contributor

risicle commented Sep 16, 2020

not at all

@Pamplemousse Pamplemousse deleted the Pamplemousse:topydo branch Sep 18, 2020
@Pamplemousse Pamplemousse mentioned this pull request Sep 18, 2020
4 of 10 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.