$53 GRAYBYTE WORDPRESS FILE MANAGER $86

SERVER : vnpttt-amd7f72-h1.vietnix.vn #1 SMP Fri May 24 12:42:50 UTC 2024
SERVER IP : 103.200.23.149 | ADMIN IP 216.73.216.22
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/opt/cloudlinux/venv/lib/python3.11/site-packages/_pytest/

HOME
Current File : /opt/cloudlinux/venv/lib/python3.11/site-packages/_pytest//nose.py
"""Run testsuites written for nose."""
import warnings

from _pytest.config import hookimpl
from _pytest.deprecated import NOSE_SUPPORT
from _pytest.fixtures import getfixturemarker
from _pytest.nodes import Item
from _pytest.python import Function
from _pytest.unittest import TestCaseFunction


@hookimpl(trylast=True)
def pytest_runtest_setup(item: Item) -> None:
    if not isinstance(item, Function):
        return
    # Don't do nose style setup/teardown on direct unittest style classes.
    if isinstance(item, TestCaseFunction):
        return

    # Capture the narrowed type of item for the teardown closure,
    # see https://github.com/python/mypy/issues/2608
    func = item

    call_optional(func.obj, "setup", func.nodeid)
    func.addfinalizer(lambda: call_optional(func.obj, "teardown", func.nodeid))

    # NOTE: Module- and class-level fixtures are handled in python.py
    # with `pluginmanager.has_plugin("nose")` checks.
    # It would have been nicer to implement them outside of core, but
    # it's not straightforward.


def call_optional(obj: object, name: str, nodeid: str) -> bool:
    method = getattr(obj, name, None)
    if method is None:
        return False
    is_fixture = getfixturemarker(method) is not None
    if is_fixture:
        return False
    if not callable(method):
        return False
    # Warn about deprecation of this plugin.
    method_name = getattr(method, "__name__", str(method))
    warnings.warn(
        NOSE_SUPPORT.format(nodeid=nodeid, method=method_name, stage=name), stacklevel=2
    )
    # If there are any problems allow the exception to raise rather than
    # silently ignoring it.
    method()
    return True

Current_dir [ NOT WRITEABLE ] Document_root [ WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
17 Dec 2025 3.08 AM
root / root
0755
__pycache__
--
14 Aug 2025 9.24 PM
root / root
0755
_code
--
14 Aug 2025 9.24 PM
root / root
0755
_io
--
14 Aug 2025 9.24 PM
root / root
0755
_py
--
14 Aug 2025 9.24 PM
root / root
0755
assertion
--
14 Aug 2025 9.24 PM
root / root
0755
config
--
14 Aug 2025 9.24 PM
root / root
0755
mark
--
14 Aug 2025 9.24 PM
root / root
0755
__init__.py
0.348 KB
17 Apr 2025 8.10 PM
root / root
0644
_argcomplete.py
3.705 KB
17 Apr 2025 8.10 PM
root / root
0644
_version.py
0.156 KB
17 Apr 2025 8.10 PM
root / root
0644
cacheprovider.py
20.891 KB
17 Apr 2025 8.10 PM
root / root
0644
capture.py
33.923 KB
17 Apr 2025 8.10 PM
root / root
0644
compat.py
12.891 KB
17 Apr 2025 8.10 PM
root / root
0644
debugging.py
13.182 KB
17 Apr 2025 8.10 PM
root / root
0644
deprecated.py
5.358 KB
17 Apr 2025 8.10 PM
root / root
0644
doctest.py
25.353 KB
17 Apr 2025 8.10 PM
root / root
0644
faulthandler.py
3.041 KB
17 Apr 2025 8.10 PM
root / root
0644
fixtures.py
65.513 KB
17 Apr 2025 8.10 PM
root / root
0644
freeze_support.py
1.308 KB
17 Apr 2025 8.10 PM
root / root
0644
helpconfig.py
8.338 KB
17 Apr 2025 8.10 PM
root / root
0644
hookspec.py
31.795 KB
17 Apr 2025 8.10 PM
root / root
0644
junitxml.py
25.113 KB
17 Apr 2025 8.10 PM
root / root
0644
legacypath.py
16.532 KB
17 Apr 2025 8.10 PM
root / root
0644
logging.py
33.233 KB
17 Apr 2025 8.10 PM
root / root
0644
main.py
31.729 KB
17 Apr 2025 8.10 PM
root / root
0644
monkeypatch.py
14.509 KB
17 Apr 2025 8.10 PM
root / root
0644
nodes.py
25.937 KB
17 Apr 2025 8.10 PM
root / root
0644
nose.py
1.648 KB
17 Apr 2025 8.10 PM
root / root
0644
outcomes.py
10.016 KB
17 Apr 2025 8.10 PM
root / root
0644
pastebin.py
3.856 KB
17 Apr 2025 8.10 PM
root / root
0644
pathlib.py
25.219 KB
17 Apr 2025 8.10 PM
root / root
0644
py.typed
0 KB
17 Apr 2025 8.10 PM
root / root
0644
pytester.py
60.519 KB
17 Apr 2025 8.10 PM
root / root
0644
pytester_assertions.py
2.272 KB
17 Apr 2025 8.10 PM
root / root
0644
python.py
69.487 KB
17 Apr 2025 8.10 PM
root / root
0644
python_api.py
37.5 KB
17 Apr 2025 8.10 PM
root / root
0644
python_path.py
0.692 KB
17 Apr 2025 8.10 PM
root / root
0644
recwarn.py
10.674 KB
17 Apr 2025 8.10 PM
root / root
0644
reports.py
20.352 KB
17 Apr 2025 8.10 PM
root / root
0644
runner.py
18.015 KB
17 Apr 2025 8.10 PM
root / root
0644
scope.py
2.814 KB
17 Apr 2025 8.10 PM
root / root
0644
setuponly.py
3.185 KB
17 Apr 2025 8.10 PM
root / root
0644
setupplan.py
1.186 KB
17 Apr 2025 8.10 PM
root / root
0644
skipping.py
9.961 KB
17 Apr 2025 8.10 PM
root / root
0644
stash.py
2.983 KB
17 Apr 2025 8.10 PM
root / root
0644
stepwise.py
4.604 KB
17 Apr 2025 8.10 PM
root / root
0644
terminal.py
52.255 KB
17 Apr 2025 8.10 PM
root / root
0644
threadexception.py
2.847 KB
17 Apr 2025 8.10 PM
root / root
0644
timing.py
0.366 KB
17 Apr 2025 8.10 PM
root / root
0644
tmpdir.py
11.434 KB
17 Apr 2025 8.10 PM
root / root
0644
unittest.py
14.462 KB
17 Apr 2025 8.10 PM
root / root
0644
unraisableexception.py
3.116 KB
17 Apr 2025 8.10 PM
root / root
0644
warning_types.py
4.369 KB
17 Apr 2025 8.10 PM
root / root
0644
warnings.py
4.951 KB
17 Apr 2025 8.10 PM
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME
Static GIF