Giter Club home page Giter Club logo

Comments (16)

twisted-trac avatar twisted-trac commented on May 10, 2024
moshez's avatar @moshez commented
#!html
<pre>
I've solved the test_setup problem in a way similar to what itamar
suggested.
</pre>

from twisted.

twisted-trac avatar twisted-trac commented on May 10, 2024
moshez's avatar @moshez commented
#!html
<pre>
upgrading to urgent
</pre>

from twisted.

twisted-trac avatar twisted-trac commented on May 10, 2024
moshez's avatar @moshez commented
#!html
<pre>
woops, mis-bug
downgrading back to bug
</pre>

from twisted.

twisted-trac avatar twisted-trac commented on May 10, 2024
moshez's avatar @moshez commented
#!html
<pre>
/cvs/Twisted/twisted/test/test_doc.py,v  &lt;--  test_doc.py
new revision: 1.5; previous revision: 1.4

Fixed.
</pre>

from twisted.

twisted-trac avatar twisted-trac commented on May 10, 2024
exarkun's avatar @exarkun commented
#!html
<pre>
FAILURE: testPackages (twisted.test.test_doc.DocCoverage)
-------------------------------------------------------------------------------
Traceback (most recent call last):
  File
"/usr/local/lib/python2.3/site-packages/twisted/trial/unittest.py",
line 192, in _runPhase
    stage(*args, **kwargs)
  File
"/usr/local/lib/python2.3/site-packages/twisted/trial/unittest.py",
line 213, in _main
    self.testCase.setUp()
  File
"/usr/local/lib/python2.3/site-packages/twisted/test/test_doc.py",
line 21, in setUp
    assert (path.dirname(setup.__file__) ==
AssertionError: &lt;module 'setup' from
'/home/exarkun/projects/python/Divmod/setup.pyc'> is not
Twisted setup.py

</pre>

from twisted.

twisted-trac avatar twisted-trac commented on May 10, 2024
exarkun's avatar @exarkun commented
#!html
<pre>
test_setup seems prone to this as well:
Could not import twisted.test.test_setup: Traceback:
exceptions.SystemExit, invalid command name 'test/'
/usr/local/lib/python2.3/site-packages/twisted/trial/unittest.py:283:addModule
/usr/local/lib/python2.3/site-packages/twisted/python/reflect.py:369:namedModule
/usr/local/lib/python2.3/site-packages/twisted/test/test_setup.py:18:?
/home/exarkun/projects/python/Divmod/setup.py:74:?
/usr/local/lib/python2.3/distutils/core.py:135:setup
/usr/local/lib/python2.3/distutils/dist.py:422:parse_command_line
/usr/local/lib/python2.3/distutils/dist.py:462:_parse_command_opts

</pre>

from twisted.

twisted-trac avatar twisted-trac commented on May 10, 2024
glyph's avatar @glyph commented
#!html
<pre>
Congratulations.

</pre>

from twisted.

twisted-trac avatar twisted-trac commented on May 10, 2024
moshez's avatar @moshez commented
#!html
<pre>
exarkun, can you explain how to reproduce the "test_setup" problem? And perhaps open a new bug report about that?
Thanks.
</pre>

from twisted.

twisted-trac avatar twisted-trac commented on May 10, 2024
exarkun's avatar @exarkun commented
#!html
<pre>
"trial test_setup.py" is sufficient to reproduce the 2nd traceback here.
The first is harder to track down.  I'll attach detailed instructions once I can
produce them.
</pre>

from twisted.

twisted-trac avatar twisted-trac commented on May 10, 2024
itamarst's avatar @itamarst commented
#!html
<pre>
test_doc is easy to fix - there's no real reason for it to import setup. You can
get the list of packages by using os.listdir(os.path.dirname(twisted.__file__))
and filtering a bit.
</pre>

from twisted.

twisted-trac avatar twisted-trac commented on May 10, 2024
moshez's avatar @moshez commented
#!html
<pre>
exarkun, I can't reproduce:

moshez@princeofwales:~/src/Twisted$ python2.2 bin/trial  test_setup.py
bin/trial: Can't find anything named 'test_setup.py' to run
moshez@princeofwales:~/src/Twisted$ python2.2 bin/trial twisted/test/test_setup.py
.
-------------------------------------------------------------------------------
Ran 1 tests in 0.581s

OK
moshez@princeofwales:~/src/Twisted$ python2.2
Python 2.2.1 (#1, Sep  7 2002, 14:34:30)
[GCC 2.95.4 20011002 (Debian prerelease)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
</pre>

from twisted.

twisted-trac avatar twisted-trac commented on May 10, 2024
itamarst's avatar @itamarst commented
#!html
<pre>
You need to have a folder with a setup.py in your PYTHONPATH before your Twisted
folder, so it imports Quotient/setup.py instead of Twisted/setup.py.
</pre>

from twisted.

twisted-trac avatar twisted-trac commented on May 10, 2024
moshez's avatar @moshez commented
#!html
<pre>
oh, wow.
I think this should be classified as "user error", since there's
nothing more we can do, and it requires a fairly non-standard
setup.
Alternatively, maybe we can use "execfile(parent of parent(twisted.__init__.__file__)+"/setup.py")"
</pre>

from twisted.

twisted-trac avatar twisted-trac commented on May 10, 2024
exarkun's avatar @exarkun commented
#!html
<pre>
"setup.py" is not part of the twisted package.  We shouldn't be importing it.

I agree with itamar.  We don't need setup.py to tell us what packages we have.
</pre>

from twisted.

twisted-trac avatar twisted-trac commented on May 10, 2024
moshez's avatar @moshez commented
#!html
<pre>
We don't.
test_setup *TESTS SETUP*
It is impossible to do it without actually TESTING SETUP
Considering that it has CAUGHT BUGS I do not want to remove it.
</pre>

from twisted.

twisted-trac avatar twisted-trac commented on May 10, 2024
itamarst's avatar @itamarst commented
#!html
<pre>
How about
sys.path.insert(0, dirname(dirname(twisted.__file__)))
import setup
sys.path.remove(...)

That should fix test_setup, or what moshez said, but test_setup *has* to run.
for test_doc we should just remove it.
</pre>

from twisted.

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.