|
System | : | Linux MiraNet 3.0.0-14-generic-pae #23-Ubuntu SMP Mon Nov 21 22:07:10 UTC 2011 i686 |
Software | : | Apache. PHP/5.3.6-13ubuntu3.10 |
ID | : | uid=65534(nobody) gid=65534(nogroup) groups=65534(nogroup)
|
|
Safe Mode | : | OFF |
Open_Basedir | : | OFF |
Freespace | : | 23.98 GB of 70.42 GB (34.05%) |
|
MySQL: ON MSSQL: OFF Oracle: OFF PostgreSQL: OFF Curl: OFF Sockets: ON Fetch: OFF Wget: ON Perl: ON |
Disabled Functions: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
|
[ System Info ]
[ Processes ]
[ SQL Manager ]
[ Eval ]
[ Encoder ]
[ Mailer ]
[ Back Connection ]
[ Backdoor Server ]
[ Kernel Exploit Search ]
[ MD5 Decrypter ]
[ Reverse IP ]
[ Kill Shell ]
[ FTP Brute-Force ]
|
|
/
usr/
share/
pyshared/
twisted/
trial/
test/
- drwxr-xr-x
|
Viewing file: sample.py (2.02 KB) -rw-r--r--Select action/file-type:  ( +) |  ( +) |  ( +) | Code ( +) | Session ( +) |  ( +) | SDB ( +) |  ( +) |  ( +) |  ( +) |  ( +) |  ( +) |
"""This module is used by test_loader to test the Trial test loading functionality. Do NOT change the number of tests in this module. Do NOT change the names the tests in this module. """
import unittest as pyunit from twisted.trial import unittest from twisted.python.util import mergeFunctionMetadata
class FooTest(unittest.TestCase):
def test_foo(self): pass
def test_bar(self): pass
def badDecorator(fn): """ Decorate a function without preserving the name of the original function. Always return a function with the same name. """ def nameCollision(*args, **kwargs): return fn(*args, **kwargs) return nameCollision
def goodDecorator(fn): """ Decorate a function and preserve the original name. """ def nameCollision(*args, **kwargs): return fn(*args, **kwargs) return mergeFunctionMetadata(fn, nameCollision)
class DecorationTest(unittest.TestCase): def test_badDecorator(self): """ This test method is decorated in a way that gives it a confusing name that collides with another method. """ test_badDecorator = badDecorator(test_badDecorator)
def test_goodDecorator(self): """ This test method is decorated in a way that preserves its name. """ test_goodDecorator = goodDecorator(test_goodDecorator)
def renamedDecorator(self): """ This is secretly a test method and will be decorated and then renamed so test discovery can find it. """ test_renamedDecorator = goodDecorator(renamedDecorator)
def nameCollision(self): """ This isn't a test, it's just here to collide with tests. """
class PyunitTest(pyunit.TestCase):
def test_foo(self): pass
def test_bar(self): pass
class NotATest(object):
def test_foo(self): pass
class AlphabetTest(unittest.TestCase):
def test_a(self): pass
def test_b(self): pass
def test_c(self): pass
|