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

setup.py test failures #210

Closed
wwood opened this issue May 2, 2016 · 1 comment
Closed

setup.py test failures #210

wwood opened this issue May 2, 2016 · 1 comment

Comments

@wwood
Copy link

wwood commented May 2, 2016

Hi,

I'm attempting to package python-future for GNU Guix, and I'm running into a lot (>40) errors of the following form in python-3, which basically means that the test script written as a tempfile is not provided a path to the python-future libraries e.g. through PYTHONPATH, I think.

======================================================================
ERROR: test_range_slice (test_future.test_pasteurize.TestPasteurize)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/nix-build-python-future-0.15.2.drv-8/future-0.15.2/src/future/tests/base.py", line 327, in _futurize_test_script
    output = check_output(call_args, stderr=STDOUT, env=self.env)
  File "/gnu/store/r4zwlr5shh8rvrn66f85gyzfw7lr8n94-python-3.4.3/lib/python3.4/subprocess.py", line 620, in check_output
    raise CalledProcessError(retcode, process.args, output=output)
subprocess.CalledProcessError: Command '['/gnu/store/c85ra04bkpj9q7wxw21zwssxm6hv1v47-python-wrapper-3.4.3/bin/python', 'pasteurize.py', '-w', '/tmp/nix-build-python-future-0.15.2.drv-8/tmp20uitj3u/mytestscript.py']' returned non-zero exit status 1

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/tmp/nix-build-python-future-0.15.2.drv-8/future-0.15.2/tests/test_future/test_pasteurize.py", line 43, in test_range_slice
    self.unchanged(code, from3=True)
  File "/tmp/nix-build-python-future-0.15.2.drv-8/future-0.15.2/src/future/tests/base.py", line 284, in unchanged
    self.convert_check(code, code, **kwargs)
  File "/tmp/nix-build-python-future-0.15.2.drv-8/future-0.15.2/src/future/tests/base.py", line 270, in convert_check
    from3=from3, run=run, conservative=conservative)
  File "/tmp/nix-build-python-future-0.15.2.drv-8/future-0.15.2/src/future/tests/base.py", line 185, in convert
    from3=from3, conservative=conservative)
  File "/tmp/nix-build-python-future-0.15.2.drv-8/future-0.15.2/src/future/tests/base.py", line 342, in _futurize_test_script
    raise ErrorClass(msg, e.returncode, e.cmd, output=e.output)
future.tests.base.PasteurizeError: Command '['/gnu/store/c85ra04bkpj9q7wxw21zwssxm6hv1v47-python-wrapper-3.4.3/bin/python', 'pasteurize.py', '-w', '/tmp/nix-build-python-future-0.15.2.drv-8/tmp20uitj3u/mytestscript.py']' failed with exit status 1
Message: Error running the command /gnu/store/c85ra04bkpj9q7wxw21zwssxm6hv1v47-python-wrapper-3.4.3/bin/python pasteurize.py -w /tmp/nix-build-python-future-0.15.2.drv-8/tmp20uitj3u/mytestscript.py
env={'PYTHONPATH': '/tmp/nix-build-python-future-0.15.2.drv-8/future-0.15.2::/tmp/nix-build-python-future-0.15.2.drv-8/future-0.15.2/future-0.15.2/build/lib'}
Contents of file /tmp/nix-build-python-future-0.15.2.drv-8/tmp20uitj3u/mytestscript.py:

----
for i in range(10**8)[:10]:
    pass

----
Output: b'Traceback (most recent call last):\n  File "pasteurize.py", line 21, in <module>\n    from libpasteurize.main import main\nImportError: No module named \'libpasteurize\'\n'

On python-2, running python setup.py test fails with

running "python setup.py" with command "test" and parameters ()
/gnu/store/kcc3cxnx9l2hbg7pjhxsa0r5yq2j2f38-python-2.7.10/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'entry_points'
  warnings.warn(msg)
/gnu/store/kcc3cxnx9l2hbg7pjhxsa0r5yq2j2f38-python-2.7.10/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'install_requires'
  warnings.warn(msg)
/gnu/store/kcc3cxnx9l2hbg7pjhxsa0r5yq2j2f38-python-2.7.10/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'include_package_data'
  warnings.warn(msg)
/gnu/store/kcc3cxnx9l2hbg7pjhxsa0r5yq2j2f38-python-2.7.10/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'test_suite'
  warnings.warn(msg)
/gnu/store/kcc3cxnx9l2hbg7pjhxsa0r5yq2j2f38-python-2.7.10/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'tests_require'
  warnings.warn(msg)
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
   or: setup.py --help [cmd1 cmd2 ...]
   or: setup.py --help-commands
   or: setup.py cmd --help

error: invalid command 'test'

And can I give a gentle +1 to #165 too please? I think all the tests will pass after that. Thanks.

@jmadler
Copy link
Contributor

jmadler commented May 6, 2019

Hi! I believe this may have been resolved in 0.17. Can you please confirm and reopen if this is still a valid bug?

@jmadler jmadler closed this as completed May 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants