System
:
Linux server1.ontime-gulf.com 4.18.0-553.5.1.el8_10.x86_64 #1 SMP Wed Jun 5 09:12:13 EDT 2024 x86_64
Software
:
Apache
Server
:
162.0.230.206
Domains
:
40 Domain
Permission
:
[
drwxr-xr-x
]
:
/
lib64
/
python2.7
/
unittest
/
216.73.216.50
Select
Submit
Home
Add User
Mailer
About
DBName
DBUser
DBPass
DBHost
WpUser
WpPass
Input e-mail
ACUPOFTEA for mail.ontime-ae.com made by tabagkayu.
Folder Name
File Name
File Content
File
runner.py
"""Running tests""" import sys import time from . import result from .signals import registerResult __unittest = True class _WritelnDecorator(object): """Used to decorate file-like objects with a handy 'writeln' method""" def __init__(self,stream): self.stream = stream def __getattr__(self, attr): if attr in ('stream', '__getstate__'): raise AttributeError(attr) return getattr(self.stream,attr) def writeln(self, arg=None): if arg: self.write(arg) self.write('\n') # text-mode streams translate to \r\n if needed class TextTestResult(result.TestResult): """A test result class that can print formatted text results to a stream. Used by TextTestRunner. """ separator1 = '=' * 70 separator2 = '-' * 70 def __init__(self, stream, descriptions, verbosity): super(TextTestResult, self).__init__(stream, descriptions, verbosity) self.stream = stream self.showAll = verbosity > 1 self.dots = verbosity == 1 self.descriptions = descriptions def getDescription(self, test): doc_first_line = test.shortDescription() if self.descriptions and doc_first_line: return '\n'.join((str(test), doc_first_line)) else: return str(test) def startTest(self, test): super(TextTestResult, self).startTest(test) if self.showAll: self.stream.write(self.getDescription(test)) self.stream.write(" ... ") self.stream.flush() def addSuccess(self, test): super(TextTestResult, self).addSuccess(test) if self.showAll: self.stream.writeln("ok") elif self.dots: self.stream.write('.') self.stream.flush() def addError(self, test, err): super(TextTestResult, self).addError(test, err) if self.showAll: self.stream.writeln("ERROR") elif self.dots: self.stream.write('E') self.stream.flush() def addFailure(self, test, err): super(TextTestResult, self).addFailure(test, err) if self.showAll: self.stream.writeln("FAIL") elif self.dots: self.stream.write('F') self.stream.flush() def addSkip(self, test, reason): super(TextTestResult, self).addSkip(test, reason) if self.showAll: self.stream.writeln("skipped {0!r}".format(reason)) elif self.dots: self.stream.write("s") self.stream.flush() def addExpectedFailure(self, test, err): super(TextTestResult, self).addExpectedFailure(test, err) if self.showAll: self.stream.writeln("expected failure") elif self.dots: self.stream.write("x") self.stream.flush() def addUnexpectedSuccess(self, test): super(TextTestResult, self).addUnexpectedSuccess(test) if self.showAll: self.stream.writeln("unexpected success") elif self.dots: self.stream.write("u") self.stream.flush() def printErrors(self): if self.dots or self.showAll: self.stream.writeln() self.printErrorList('ERROR', self.errors) self.printErrorList('FAIL', self.failures) def printErrorList(self, flavour, errors): for test, err in errors: self.stream.writeln(self.separator1) self.stream.writeln("%s: %s" % (flavour,self.getDescription(test))) self.stream.writeln(self.separator2) self.stream.writeln("%s" % err) class TextTestRunner(object): """A test runner class that displays results in textual form. It prints out the names of tests as they are run, errors as they occur, and a summary of the results at the end of the test run. """ resultclass = TextTestResult def __init__(self, stream=sys.stderr, descriptions=True, verbosity=1, failfast=False, buffer=False, resultclass=None): self.stream = _WritelnDecorator(stream) self.descriptions = descriptions self.verbosity = verbosity self.failfast = failfast self.buffer = buffer if resultclass is not None: self.resultclass = resultclass def _makeResult(self): return self.resultclass(self.stream, self.descriptions, self.verbosity) def run(self, test): "Run the given test case or test suite." result = self._makeResult() registerResult(result) result.failfast = self.failfast result.buffer = self.buffer startTime = time.time() startTestRun = getattr(result, 'startTestRun', None) if startTestRun is not None: startTestRun() try: test(result) finally: stopTestRun = getattr(result, 'stopTestRun', None) if stopTestRun is not None: stopTestRun() stopTime = time.time() timeTaken = stopTime - startTime result.printErrors() if hasattr(result, 'separator2'): self.stream.writeln(result.separator2) run = result.testsRun self.stream.writeln("Ran %d test%s in %.3fs" % (run, run != 1 and "s" or "", timeTaken)) self.stream.writeln() expectedFails = unexpectedSuccesses = skipped = 0 try: results = map(len, (result.expectedFailures, result.unexpectedSuccesses, result.skipped)) except AttributeError: pass else: expectedFails, unexpectedSuccesses, skipped = results infos = [] if not result.wasSuccessful(): self.stream.write("FAILED") failed, errored = map(len, (result.failures, result.errors)) if failed: infos.append("failures=%d" % failed) if errored: infos.append("errors=%d" % errored) else: self.stream.write("OK") if skipped: infos.append("skipped=%d" % skipped) if expectedFails: infos.append("expected failures=%d" % expectedFails) if unexpectedSuccesses: infos.append("unexpected successes=%d" % unexpectedSuccesses) if infos: self.stream.writeln(" (%s)" % (", ".join(infos),)) else: self.stream.write("\n") return result
New name for
Are you sure will delete
?
New date for
New perm for
Name
Type
Size
Permission
Last Modified
Actions
.
DIR
-
drwxr-xr-x
2024-06-24 12:45:06
..
DIR
-
drwxr-xr-x
2024-06-24 12:45:06
test
DIR
-
drwxr-xr-x
2024-06-24 12:45:06
__init__.py
text/x-python
2.72 KB
-rw-r--r--
2024-04-10 04:58:35
__init__.pyc
application/octet-stream
2.97 KB
-rw-r--r--
2024-04-10 04:58:46
__init__.pyo
application/octet-stream
2.97 KB
-rw-r--r--
2024-04-10 04:58:46
__main__.py
text/x-python
238 B
-rw-r--r--
2024-04-10 04:58:35
__main__.pyc
application/octet-stream
488 B
-rw-r--r--
2024-04-10 04:58:46
__main__.pyo
application/octet-stream
488 B
-rw-r--r--
2024-04-10 04:58:46
case.py
text/x-python
42.95 KB
-rw-r--r--
2024-04-10 04:58:35
case.pyc
application/octet-stream
40.7 KB
-rw-r--r--
2024-04-10 04:58:46
case.pyo
application/octet-stream
40.7 KB
-rw-r--r--
2024-04-10 04:58:46
loader.py
text/x-python
13.18 KB
-rw-r--r--
2024-04-10 04:58:35
loader.pyc
application/octet-stream
11.11 KB
-rw-r--r--
2024-04-10 04:58:46
loader.pyo
application/octet-stream
10.97 KB
-rw-r--r--
2024-04-10 04:58:44
main.py
text/x-python
8.87 KB
-rw-r--r--
2024-04-10 04:58:35
main.pyc
application/octet-stream
7.81 KB
-rw-r--r--
2024-04-10 04:58:46
main.pyo
application/octet-stream
7.81 KB
-rw-r--r--
2024-04-10 04:58:46
result.py
text/x-python
6.16 KB
-rw-r--r--
2024-04-10 04:58:35
result.pyc
application/octet-stream
7.74 KB
-rw-r--r--
2024-04-10 04:58:46
result.pyo
application/octet-stream
7.74 KB
-rw-r--r--
2024-04-10 04:58:46
runner.py
text/x-python
6.38 KB
-rw-r--r--
2024-04-10 04:58:35
runner.pyc
application/octet-stream
7.45 KB
-rw-r--r--
2024-04-10 04:58:46
runner.pyo
application/octet-stream
7.45 KB
-rw-r--r--
2024-04-10 04:58:46
signals.py
text/x-python
2.35 KB
-rw-r--r--
2024-04-10 04:58:35
signals.pyc
application/octet-stream
2.72 KB
-rw-r--r--
2024-04-10 04:58:46
signals.pyo
application/octet-stream
2.72 KB
-rw-r--r--
2024-04-10 04:58:46
suite.py
text/x-python
9.58 KB
-rw-r--r--
2024-04-10 04:58:35
suite.pyc
application/octet-stream
10.29 KB
-rw-r--r--
2024-04-10 04:58:46
suite.pyo
application/octet-stream
10.29 KB
-rw-r--r--
2024-04-10 04:58:46
util.py
text/x-python
4.5 KB
-rw-r--r--
2024-04-10 04:58:35
util.pyc
application/octet-stream
4.41 KB
-rw-r--r--
2024-04-10 04:58:46
util.pyo
application/octet-stream
4.41 KB
-rw-r--r--
2024-04-10 04:58:46
~ ACUPOFTEA - mail.ontime-ae.com