Apache/2.4.7 (Ubuntu) Linux sman1baleendah 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) safemode : OFF MySQL: ON | Perl: ON | cURL: OFF | WGet: ON > / usr / lib / python2.7 / dist-packages / twisted / trial / test / | server ip : 104.21.89.46 your ip : 172.70.127.169 H O M E |
Filename | /usr/lib/python2.7/dist-packages/twisted/trial/test/mockcustomsuite.py |
Size | 535 |
Permission | rw-r--r-- |
Owner | root : root |
Create time | 27-Apr-2025 09:56 |
Last modified | 23-Aug-2012 21:47 |
Last accessed | 04-Jul-2025 06:21 |
Actions | edit | rename | delete | download (gzip) |
View | text | code | image |
# Copyright (c) 2006 Twisted Matrix Laboratories. See LICENSE for details
"""
Mock test module that contains a C{test_suite} method. L{runner.TestLoader}
should load the tests from the C{test_suite}, not from the C{Foo} C{TestCase}.
See {twisted.trial.test.test_loader.LoaderTest.test_loadModuleWith_test_suite}.
"""
from twisted.trial import unittest, runner
class Foo(unittest.SynchronousTestCase):
def test_foo(self):
pass
def test_suite():
ts = runner.TestSuite()
ts.name = "MyCustomSuite"
return ts
"""
Mock test module that contains a C{test_suite} method. L{runner.TestLoader}
should load the tests from the C{test_suite}, not from the C{Foo} C{TestCase}.
See {twisted.trial.test.test_loader.LoaderTest.test_loadModuleWith_test_suite}.
"""
from twisted.trial import unittest, runner
class Foo(unittest.SynchronousTestCase):
def test_foo(self):
pass
def test_suite():
ts = runner.TestSuite()
ts.name = "MyCustomSuite"
return ts