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

python2Packages.cmd2_8: 0.8.0 -> 0.8.9, fix build #62171

Closed
wants to merge 1 commit into from

Conversation

infinisil
Copy link
Member

I haven't tried to build it on darwin

Motivation for this change
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option 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 nix-review --run "nix-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)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@infinisil infinisil requested a review from FRidh as a code owner May 28, 2019 20:02
@infinisil
Copy link
Member Author

@GrahamcOfBorg build python2.pkgs.cmd2_8
@GrahamcOfBorg build python3.pkgs.cmd2_8

@infinisil infinisil changed the title python2Packages.cmd2: Fix build python2Packages.cmd2_8: 0.8.0 -> 0.8.9, fix build May 28, 2019
@infinisil
Copy link
Member Author

@GrahamcOfBorg build python2.pkgs.cmd2_8
@GrahamcOfBorg build python3.pkgs.cmd2_8

@teto
Copy link
Member

teto commented May 29, 2019

@GrahamcOfBorg build python2.pkgs.cmd2_8
@GrahamcOfBorg build python3.pkgs.cmd2_8

@infinisil
Copy link
Member Author

I'm not so sure anymore whether it actually built now, the tests take so long.. I'm running them on my machine now and will report back

@infinisil
Copy link
Member Author

Nope, it doesn't work, not sure what I was doing lol. Here are the final test failures:

=================================== FAILURES ===================================
___________________________ test_output_redirection ____________________________

base_app = <cmd2.Cmd instance at 0x7fffee136560>

    def test_output_redirection(base_app):
        fd, filename = tempfile.mkstemp(prefix='cmd2_test', suffix='.txt')
        os.close(fd)

        try:
            # Verify that writing to a file works
            run_cmd(base_app, 'help > {}'.format(filename))
            expected = normalize(BASE_HELP)
            with open(filename) as f:
                content = normalize(f.read())
            assert content == expected

            # Verify that appending to a file also works
            run_cmd(base_app, 'help history >> {}'.format(filename))
            expected = normalize(BASE_HELP + '\n' + HELP_HISTORY)
            with open(filename) as f:
                content = normalize(f.read())
>           assert content == expected
E           AssertionError: assert ['usage: hist...y items', ...] == ['Documented c...] [arg]', ...]
E             At index 0 diff: 'usage: history [-h] [-r | -e | -s | -o FILE | -t TRANSCRIPT] [arg]' != 'Documented commands (type help <topic>):'
E             Right contains more items, first extra item: '  -s, --script          script format; no separation lines'
E             Use -v to get the full diff

tests/test_cmd2.py:550: AssertionError
__________________________ test_parse_output_redirect __________________________

parser = {Empty {{stringEnd ^ "
EOF"} | {{{{"multiline"} ^ {~{{"multiline"}} W:(!#$%...... lineEnd}) {lineEnd lineEnd}} | {{"multiline"} SkipTo:({stringEnd ^ "
EOF"})}}}

    def test_parse_output_redirect(parser):
        line = 'output into > afile.txt'
        results = parser.parseString(line)
        assert results.command == 'output'
        assert results.args == 'into'
>       assert results.output == '>'
E       AssertionError: assert (['>'], {}) == '>'
E        +  where (['>'], {}) = (['output', 'into', '>', 'afile.txt'], {'output': [(['>'], {})], 'args': ['int...'output'], 'statement': [(['output', 'into'], {})], 'outputTo': ['afile.txt']}).output

tests/test_parsing.py:197: AssertionError
_________________ test_parse_output_redirect_with_dash_in_path _________________

parser = {Empty {{stringEnd ^ "
EOF"} | {{{{"multiline"} ^ {~{{"multiline"}} W:(!#$%...... lineEnd}) {lineEnd lineEnd}} | {{"multiline"} SkipTo:({stringEnd ^ "
EOF"})}}}

    def test_parse_output_redirect_with_dash_in_path(parser):
        line = 'output into > python-cmd2/afile.txt'
        results = parser.parseString(line)
        assert results.command == 'output'
        assert results.args == 'into'
>       assert results.output == '>'
E       AssertionError: assert (['>'], {}) == '>'
E        +  where (['>'], {}) = (['output', 'into', '>', 'python-cmd2/afile.txt'], {'output': [(['>'], {})], '...statement': [(['output', 'into'], {})], 'outputTo': ['python-cmd2/afile.txt']}).output

tests/test_parsing.py:205: AssertionError
_________________________ test_parse_pipe_and_redirect _________________________

parser = {Empty {{stringEnd ^ "
EOF"} | {{{{"multiline"} ^ {~{{"multiline"}} W:(!#$%...... lineEnd}) {lineEnd lineEnd}} | {{"multiline"} SkipTo:({stringEnd ^ "
EOF"})}}}

    def test_parse_pipe_and_redirect(parser):
        line = 'output into;sufx | pipethrume plz > afile.txt'
        results = parser.parseString(line)
        assert results.command == 'output'
        assert results.args == 'into'
        assert results.terminator == ';'
        assert results.suffix == 'sufx'
        assert results.pipeTo == ' pipethrume plz'
>       assert results.output == '>'
E       AssertionError: assert (['>'], {}) == '>'
E        +  where (['>'], {}) = (['output', 'into', ';', 'sufx', '|', ' pipethrume plz', '>', 'afile.txt'], {'...tput', 'into', ';'], {})], 'output': [(['>'], {})], 'outputTo': ['afile.txt']}).output

tests/test_parsing.py:233: AssertionError
______________________ test_parse_output_to_paste_buffer _______________________

parser = {Empty {{stringEnd ^ "
EOF"} | {{{{"multiline"} ^ {~{{"multiline"}} W:(!#$%...... lineEnd}) {lineEnd lineEnd}} | {{"multiline"} SkipTo:({stringEnd ^ "
EOF"})}}}

    def test_parse_output_to_paste_buffer(parser):
        line = 'output to paste buffer >> '
        results = parser.parseString(line)
        assert results.command == 'output'
        assert results.args == 'to paste buffer'
>       assert results.output == '>>'
E       AssertionError: assert (['>>'], {}) == '>>'
E        +  where (['>>'], {}) = (['output', 'to paste buffer', '>>', ''], {'output': [(['>>'], {})], 'args': [...'], 'command': ['output'], 'statement': [(['output', 'to paste buffer'], {})]}).output

tests/test_parsing.py:241: AssertionError
========================== deprecated python version ===========================
You are using Python 2.7.16, which will no longer be supported in pytest 5.0
For more information, please read:
  https://docs.pytest.org/en/latest/py27-py34-deprecation.html
============== 5 failed, 285 passed, 5 skipped in 1451.74 seconds ==============
builder for '/nix/store/zbx0m6pfxxhhjgzd6ls384jznwfqv4n9-python2.7-cmd2-0.8.9.drv' failed with exit code 1
error: build of '/nix/store/zbx0m6pfxxhhjgzd6ls384jznwfqv4n9-python2.7-cmd2-0.8.9.drv' failed

So updating it doesn't seem to fix any test failures. I can't be bothered with this tbh (I'm not using the package anyways)

@infinisil infinisil closed this May 29, 2019
@infinisil infinisil deleted the fix/cmd2_8 branch May 29, 2019 20:30
@teto
Copy link
Member

teto commented May 30, 2019

I don't think any package is using it. If the problem is hydra we can mark it as broken and/or remove it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants