Пример #1
0
 def test_addPluginDir(self):
     """
     L{util.addPluginDir} is deprecated.
     """
     util.addPluginDir()
     warnings = self.flushWarnings(offendingFunctions=[self.test_addPluginDir])
     self.assertEqual(
         warnings[0]["message"], "twisted.python.util.addPluginDir is deprecated since Twisted " "12.2."
     )
     self.assertEqual(warnings[0]["category"], DeprecationWarning)
     self.assertEqual(len(warnings), 1)
 def test_addPluginDir(self):
     """
     L{util.addPluginDir} is deprecated.
     """
     util.addPluginDir()
     warnings = self.flushWarnings(
         offendingFunctions=[self.test_addPluginDir])
     self.assertEqual(
         warnings[0]['message'],
         "twisted.python.util.addPluginDir is deprecated since Twisted "
         "12.2.")
     self.assertEqual(warnings[0]['category'], DeprecationWarning)
     self.assertEqual(len(warnings), 1)
Пример #3
0
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

from __future__ import nested_scopes

from twisted import copyright
from twisted.python import usage, util, runtime, plugin
from twisted.python import log, logfile

from twisted.persisted import styles
util.addPluginDir()

# System Imports
try:
    import cPickle as pickle
except ImportError:
    import pickle

try:
    import cStringIO as StringIO
except ImportError:
    import StringIO

import traceback
import imp
import sys, os, errno