Coder Social home page Coder Social logo

Comments (7)

nidico avatar nidico commented on May 30, 2024

I'm not having this problem using the same setup on a Debian Squeeze VM.

from zope.testbrowser.

mgedmin avatar mgedmin commented on May 30, 2024

Can you run bin/test --pdb, and then at the pdb prompt do

(pdb) !import test
(pdb) p test.__file__

And also show us the contents of the buildout-generated bin/test script?

from zope.testbrowser.

nidico avatar nidico commented on May 30, 2024

Sure:

nico@pesto $ bin/test --pdb
Running zope.testrunner.layer.UnitTests tests:
  Set up zope.testrunner.layer.UnitTests in 0.000 seconds.


Error in test /home/nico/src/zope.testbrowser/src/zope/testbrowser/README.txt
Traceback (most recent call last):
  File "/usr/lib64/python2.7/doctest.py", line 2284, in debug
    runner.run(self._dt_test, clear_globs=False)
  File "/usr/lib64/python2.7/doctest.py", line 1774, in run
    r = DocTestRunner.run(self, test, compileflags, out, False)
  File "/usr/lib64/python2.7/doctest.py", line 1429, in run
    return self.__run(test, compileflags, out)
  File "/usr/lib64/python2.7/doctest.py", line 1343, in __run
    exc_info)
  File "/usr/lib64/python2.7/doctest.py", line 1780, in report_unexpected_exception
    raise UnexpectedException(test, example, exc_info)
UnexpectedException: <DocTest README.txt from /home/nico/src/zope.testbrowser/src/zope/testbrowser/README.txt:0 (408 examples)>

exceptions.ImportError:
cannot import name pystone
> /home/nico/src/zope.testbrowser/src/zope/testbrowser/browser.py(135)pystonesPerSecond()
-> from test import pystone
(Pdb) !import test
(Pdb) p test.__file__
'/usr/lib64/python2.7/test/__init__.pyc'
(Pdb)

bin/test:

#!/home/nico/src/zope.testbrowser/bin/python

import sys
sys.path[0:0] = [
    '/home/nico/src/zope.testbrowser/src',
    '/home/nico/src/zope.testbrowser/eggs/zope.testrunner-4.3.3-py2.7.egg',
    '/home/nico/src/zope.testbrowser/eggs/zope.interface-4.0.5-py2.7-linux-x86_64.egg',
    '/home/nico/src/zope.testbrowser/eggs/zope.exceptions-4.0.6-py2.7.egg',
    '/home/nico/src/zope.testbrowser/eggs/six-1.3.0-py2.7.egg',
    '/home/nico/src/zope.testbrowser/eggs/setuptools-0.6c12dev_r88846-py2.7.egg',
    '/home/nico/src/zope.testbrowser/eggs/WebTest-1.3.4-py2.7.egg',
    '/home/nico/src/zope.testbrowser/eggs/zope.testing-4.1.2-py2.7.egg',
    '/home/nico/src/zope.testbrowser/eggs/pytz-2013b-py2.7.egg',
    '/home/nico/src/zope.testbrowser/eggs/zope.schema-4.3.2-py2.7.egg',
    '/home/nico/src/zope.testbrowser/eggs/mechanize-0.2.5-py2.7.egg',
    '/home/nico/src/zope.testbrowser/eggs/WebOb-1.2.3-py2.7.egg',
    '/home/nico/src/zope.testbrowser/eggs/zope.event-4.0.2-py2.7.egg',
    ]


import zope.testrunner

if __name__ == '__main__':
    sys.exit(zope.testrunner.run((['--tests-pattern', '^f?tests$']) + [
        '--test-path', '/home/nico/src/zope.testbrowser/src',
        ]))

from zope.testbrowser.

mgedmin avatar mgedmin commented on May 30, 2024

Ok, this looks like an issue with Fedora's Python packaging (they do not ship the test.pystone module in their main Python package), and nothing to do with zope.testbrowser.

yum install python-test and the tests should pass.

from zope.testbrowser.

nidico avatar nidico commented on May 30, 2024

Confirmed! Thanks for looking into this!

from zope.testbrowser.

bazz2 avatar bazz2 commented on May 30, 2024

ImportError: cannot import name pystone -> solution is yum install python-test.
Thank you, it works~~

from zope.testbrowser.

ramadivyasri avatar ramadivyasri commented on May 30, 2024

I'm facing the same issue:
File "/usr/lib/python2.7/site-packages/dpkt/decorators.py", line 4, in
from test import pystone
ImportError: cannot import name pystone

But, yum install python-test did not resolve the issue. What else can be done?

from zope.testbrowser.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.