X7ROOT File Manager
Current Path:
/opt/cloudlinux/venv/lib/python3.11/site-packages/tap
opt
/
cloudlinux
/
venv
/
lib
/
python3.11
/
site-packages
/
tap
/
??
..
??
__init__.py
(85 B)
??
__main__.py
(48 B)
??
__pycache__
??
adapter.py
(1.47 KB)
??
directive.py
(1.75 KB)
??
formatter.py
(762 B)
??
line.py
(4.56 KB)
??
loader.py
(2.87 KB)
??
main.py
(2.07 KB)
??
parser.py
(6.63 KB)
??
rules.py
(3.3 KB)
??
runner.py
(4.95 KB)
??
tests
??
tracker.py
(7.4 KB)
Editing: adapter.py
class Adapter: """The adapter processes a TAP test line and updates a unittest result. It is an alternative to TestCase to collect TAP results. """ failureException = AssertionError def __init__(self, filename, line): self._filename = filename self._line = line def shortDescription(self): """Get the short description for verbeose results.""" return self._line.description def __call__(self, result): """Update test result with the lines in the TAP file. Provide the interface that TestCase provides to a suite or runner. """ result.startTest(self) if self._line.skip: result.addSkip(None, self._line.directive.reason) return if self._line.todo: if self._line.ok: result.addUnexpectedSuccess(self) else: result.addExpectedFailure(self, (Exception, Exception(), None)) return if self._line.ok: result.addSuccess(self) else: self.addFailure(result) def addFailure(self, result): """Add a failure to the result.""" result.addFailure(self, (Exception, Exception(), None)) # Since TAP will not provide assertion data, clean up the assertion # section so it is not so spaced out. test, err = result.failures[-1] result.failures[-1] = (test, "") def __repr__(self): return f"<file={self._filename}>"
Upload File
Create Folder