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

Huffman integration tests failing #16

Closed
sdelafond opened this issue Nov 24, 2015 · 12 comments
Closed

Huffman integration tests failing #16

sdelafond opened this issue Nov 24, 2015 · 12 comments

Comments

@sdelafond
Copy link
Contributor

============================= test session starts ==============================
platform linux2 -- Python 2.7.10 -- py-1.4.30 -- pytest-2.7.3
rootdir: /tmp/buildd/python-hpack-2.0.1, inifile: 
collected 52 items

test/test_hpack.py ..............................
test/test_hpack_integration.py EEE
test/test_huffman.py ...
test/test_table.py ................

==================================== ERRORS ====================================
____ ERROR at setup of TestHPACKDecoderIntegration.test_can_decode_a_story _____
file /tmp/buildd/python-hpack-2.0.1/.pybuild/pythonX.Y_2.7/build/test/test_hpack_integration.py, line 12
      def test_can_decode_a_story(self, story):
        fixture 'story' not found
        available fixtures: pytestconfig, recwarn, monkeypatch, capfd, capsys, tmpdir
        use 'py.test --fixtures [testpath]' for help on them.

/tmp/buildd/python-hpack-2.0.1/.pybuild/pythonX.Y_2.7/build/test/test_hpack_integration.py:12
 ERROR at setup of TestHPACKDecoderIntegration.test_can_encode_a_story_no_huffman 
file /tmp/buildd/python-hpack-2.0.1/.pybuild/pythonX.Y_2.7/build/test/test_hpack_integration.py, line 31
      def test_can_encode_a_story_no_huffman(self, raw_story):
        fixture 'raw_story' not found
        available fixtures: pytestconfig, recwarn, monkeypatch, capfd, capsys, tmpdir
        use 'py.test --fixtures [testpath]' for help on them.

/tmp/buildd/python-hpack-2.0.1/.pybuild/pythonX.Y_2.7/build/test/test_hpack_integration.py:31
 ERROR at setup of TestHPACKDecoderIntegration.test_can_encode_a_story_with_huffman 
file /tmp/buildd/python-hpack-2.0.1/.pybuild/pythonX.Y_2.7/build/test/test_hpack_integration.py, line 44
      def test_can_encode_a_story_with_huffman(self, raw_story):
        fixture 'raw_story' not found
        available fixtures: pytestconfig, recwarn, monkeypatch, capfd, capsys, tmpdir
        use 'py.test --fixtures [testpath]' for help on them.

/tmp/buildd/python-hpack-2.0.1/.pybuild/pythonX.Y_2.7/build/test/test_hpack_integration.py:44
====================== 49 passed, 3 error in 0.19 seconds ======================
E: pybuild pybuild:274: test: plugin distutils failed with: exit code=1: cd /tmp/buildd/python-hpack-2.0.1/.pybuild/pythonX.Y_2.7/build; python2.7 -m pytest test
@Lukasa
Copy link
Member

Lukasa commented Nov 24, 2015

Are you running from the .tar.gz available on PyPI, by any chance?

@sdelafond
Copy link
Contributor Author

This is actually from the 2.0.1 git tag.

@Lukasa
Copy link
Member

Lukasa commented Nov 24, 2015

How did you invoke the test?

@sdelafond
Copy link
Contributor Author

It was run like this (last line of the output) by the Debian packaging tools, after a successful build:

cd /tmp/buildd/python-hpack-2.0.1/.pybuild/pythonX.Y_2.7/build; python2.7 -m pytest test

@Lukasa
Copy link
Member

Lukasa commented Nov 24, 2015

What is present in the /tmp/buildd/python-hpack-2.0.1/.pybuild/pythonX.Y_2.7/build directory? Can you print the output of ls -R from there please?

@sdelafond
Copy link
Contributor Author

~/python-hpack-2.0.1/.pybuild/pythonX.Y_2.7/build# ls -R
.:
hpack  test

./hpack:
__init__.py  __init__.pyc  compat.py  compat.pyc  exceptions.py  exceptions.pyc  hpack.py  hpack.pyc  hpack_compat.py  huffman.py  huffman.pyc  huffman_constants.py  huffman_constants.pyc  table.py  table.pyc

./test:
__pycache__  test_hpack.py  test_hpack_integration.py  test_huffman.py  test_table.py

./test/__pycache__:
test_hpack.cpython-27-PYTEST.pyc  test_hpack_integration.cpython-27-PYTEST.pyc  test_huffman.cpython-27-PYTEST.pyc  test_table.cpython-27-PYTEST.pyc

@Lukasa
Copy link
Member

Lukasa commented Nov 24, 2015

Yeah, so the test fixtures are missing. Did you adjust the install process at all? Ordinarily the test scripts are not installed at all, which suggests someone at Debian has adjusted either setup.py or MANIFEST.in. Whomever did that failed to include the test/test_fixtures directory. If you ensure that they do correctly add that directory, your tests should function just fine.

@Lukasa Lukasa closed this as completed Nov 24, 2015
@sdelafond
Copy link
Contributor Author

I am the maintainer for that package in Debian, and didn't modify any of those files :) I'll keep searching...

@Lukasa Lukasa reopened this Nov 24, 2015
@Lukasa
Copy link
Member

Lukasa commented Nov 24, 2015

@sdelafond In that case, you need to determine how the Debian packaging process caused the test files to end up in that directory, but only the Python source files. Generally speaking I'd assume that was a change to MANIFEST.in, which can have that behaviour.

@sdelafond
Copy link
Contributor Author

OK, nailed it: there is no test/test_fixtures in my source tree, because as you originally suggested it's based on the tarball (which doesn't include it) and not your git tree: I will change the package config to directly pull from your git tree instead, which should avoid such problems going forward. Sorry for the noise, and thanks a lot for your help !

@Lukasa
Copy link
Member

Lukasa commented Nov 24, 2015

No problem @sdelafond, thanks for the packaging work! If you're planning to be packaging this for Debian for the foreseeable future I imagine I'll hear from you again, so please feel free to contact me for anything you need. My email address is available on my GitHub profile, and my GPG key is available from Keybase if it's useful for you to have both of those.

@sdelafond
Copy link
Contributor Author

Many thanks, I guess you may indeed hear from me every now and then ;) Cheers !

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

No branches or pull requests

2 participants