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

Fix haxor news #35274

Closed
wants to merge 4 commits into from
Closed

Conversation

matthiasbeyer
Copy link
Contributor

@matthiasbeyer matthiasbeyer commented Feb 21, 2018

Motivation for this change

haxor-news was broken on unstable. This PR tries to fix this.

Unfortunately, running nix-build -A haxor-news fails and nix-shell -A haxor-news + a export out=/tmp/tmpout; set -x; genericBuild succeeds.

When passing --pure to nix-shell, it fails - get a bunch of errors:

======================================================================
FAIL: test_ask (test_hacker_news_cli.HackerNewsCliTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/nix/store/yvxahn1hp58lfggh4xbhi48f96jnpfbm-python3.6-mock-2.0.0/lib/python3.6/site-packages/mock/mock.py", line 1305, in patched
    return func(*args, **keywargs)
  File "/home/m/archive/development/contrib/nixpkgs/haxor-news-0.4.3/tests/test_hacker_news_cli.py", line 43, in test_ask
    mock_hn_call.assert_called_with(self.limit)
  File "/nix/store/yvxahn1hp58lfggh4xbhi48f96jnpfbm-python3.6-mock-2.0.0/lib/python3.6/site-packages/mock/mock.py", line 925, in assert_called_with
    raise AssertionError('Expected call: %s\nNot called' % (expected,))
AssertionError: Expected call: ask(10)
Not called

Though I don't know why that happens.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • 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 nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

@matthiasbeyer
Copy link
Contributor Author

This is ugly and buggy. I'll push my latest state and then close this PR. May someone else dig into that, but the relevance of the package is not enough (for me) to dig deeper. I'm already trying for over 1 hours now... I don't care anymore!

@matthiasbeyer matthiasbeyer deleted the fix-haxor-news branch February 21, 2018 14:23
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.

None yet

1 participant