Opened 9 years ago

Closed 8 years ago

Last modified 4 years ago

#1217 defect closed fixed (fixed)

trial.util should not be used by non-Trial code

Reported by: jml Owned by:
Priority: high Milestone:
Component: names Keywords: tests
Cc: glyph, radix, exarkun, spiv, itamarst, warner, cce, jml, z3p, moshez, jknight, dreid, therve Branch:
Author: Launchpad Bug:

Description


Attachments (1)

util_defgen.diff (2.4 KB) - added by therve 9 years ago.
Remove trial.util from test_defgen

Download all attachments as: .zip

Change History (5)

comment:1 Changed 9 years ago by jml

Trial's util module is solely for the benefit of trial.  Don't use it if you
aren't Trial.  

Here are the offenders:
twisted/conch/test/test_cftp.py:5:from twisted.trial import unittest, util
twisted/conch/test/test_conch.py:11:from twisted.trial import unittest, util
twisted/conch/test/test_filetransfer.py:5:from twisted.trial import unittest, util
twisted/conch/test/test_ssh.py:17:from twisted.trial import unittest, util
twisted/conch/test/test_telnet.py:10:from twisted.trial import unittest, util
twisted/flow/test/test_flow.py:17:from twisted.trial.util import wait
twisted/lore/nevowlore.py:51:    from twisted.trial.util import wait
twisted/mail/test/test_mail.py:20:from twisted.trial import unittest, util as tutil
twisted/mail/test/test_smtp.py:12:from twisted.trial import unittest, util,
assertions
twisted/names/test/test_names.py:12:from twisted.trial.util import
deferredResult as dR
twisted/names/test/test_names.py:13:from twisted.trial.util import wait,
spinWhile, spinUntil
twisted/protocols/loopback.py:18:from twisted.trial.util import spinUntil, spinWhile
twisted/test/test_app.py:9:from twisted.trial import unittest, util
twisted/test/test_application.py:5:from twisted.trial import unittest, util
twisted/test/test_components.py:7:from twisted.trial import unittest, util
twisted/test/test_defer.py:15:from twisted.trial import unittest, util
twisted/test/test_defer.py:243:        # this is how trial.util.deferredResult works
twisted/test/test_defgen.py:5:from twisted.trial import unittest, util
twisted/test/test_factories.py:8:from twisted.trial import unittest, util
twisted/test/test_failure.py:14:from twisted.trial import unittest, util
twisted/test/test_ftp.py:20:from twisted.trial.util import wait
twisted/test/test_internet.py:6:from twisted.trial.util import spinUntil
twisted/test/test_iutils.py:10:from twisted.trial import unittest, util, assertions
twisted/test/test_pb.py:18:from twisted.trial.util import suppressWarnings
twisted/test/test_process.py:12:from twisted.trial.util import spinUntil, spinWhile
twisted/test/test_split_compat.py:3:from twisted.trial import unittest, util
twisted/test/test_tcp.py:12:from twisted.trial import unittest, util
twisted/test/test_tcp.py:13:from twisted.trial.util import spinWhile, spinUntil
twisted/test/test_udp.py:6:from twisted.trial import unittest, util
twisted/test/test_unix.py:12:from twisted.trial.util import spinWhile,
spinUntil, wait
twisted/web/test/test_distrib.py:5:from twisted.trial import unittest, util
twisted/web2/test/test_fileupload.py:2:from twisted.trial.util import wait,
spinUntil, deferredError
twisted/web2/test/test_http.py:5:from twisted.trial.util import wait, spinUntil
twisted/web2/test/test_server.py:8:from twisted.trial import unittest, util
twisted/web2/test/test_static.py:8:from twisted.trial import util, assertions
twisted/web2/test/test_stream.py:4:from twisted.trial.util import wait, spinUntil
twisted/web2/test/test_wsgi.py:6:from twisted.trial import util

Changed 9 years ago by therve

Remove trial.util from test_defgen

comment:2 Changed 9 years ago by therve

  • Cc therve added

Attached a try on test_defgen to remove util.wait. I'm not really it doest the same, especially in case of Errback. Maybe a addBoth is better ?

Note: in the list above, we can see usage of util.suppress for example. It seems like an acceptable use, doesn't it ?

comment:3 Changed 8 years ago by jml

  • Resolution set to fixed
  • Status changed from new to closed

I'm satisfied that this is done.

comment:4 Changed 4 years ago by <automation>

  • Owner jml deleted
Note: See TracTickets for help on using tickets.