!C99Shell v. 2.0 [PHP 7 Update] [25.02.2019]!

Software: Apache. PHP/7.3.33 

uname -a: Linux acloudg.aryanict.com 4.18.0-513.9.1.lve.el8.x86_64 #1 SMP Mon Dec 4 15:01:22 UTC
2023 x86_64
 

uid=1095(katebhospital) gid=1098(katebhospital) groups=1098(katebhospital) 

Safe-mode: OFF (not secure)

/opt/cloudlinux/venv/lib/python3.11/site-packages/setuptools/tests/   drwxr-xr-x
Free 293.99 GB of 429.69 GB (68.42%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     test_warnings.py (3.27 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
from inspect import cleandoc

import pytest

from setuptools.warnings import SetuptoolsDeprecationWarning, SetuptoolsWarning

_EXAMPLES = {
    "default": dict(
        args=("Hello {x}", "\n\t{target} {v:.1f}"),
        kwargs={"x": 5, "v": 3, "target": "World"},
        expected="""
    Hello 5
    !!

            ********************************************************************************
            World 3.0
            ********************************************************************************

    !!
    """,
    ),
    "futue_due_date": dict(
        args=("Summary", "Lorem ipsum"),
        kwargs={"due_date": (9999, 11, 22)},
        expected="""
    Summary
    !!

            ********************************************************************************
            Lorem ipsum

            By 9999-Nov-22, you need to update your project and remove deprecated calls
            or your builds will no longer be supported.
            ********************************************************************************

    !!
    """,
    ),
    "past_due_date_with_docs": dict(
        args=("Summary", "Lorem ipsum"),
        kwargs={"due_date": (2000, 11, 22), "see_docs": "some_page.html"},
        expected="""
    Summary
    !!

            ********************************************************************************
            Lorem ipsum

            This deprecation is overdue, please update your project and remove deprecated
            calls to avoid build errors in the future.

            See https://setuptools.pypa.io/en/latest/some_page.html for details.
            ********************************************************************************

    !!
    """,
    ),
}


@pytest.mark.parametrize("example_name", _EXAMPLES.keys())
def test_formatting(monkeypatch, example_name):
    """
    It should automatically handle indentation, interpolation and things like due date.
    """
    args = _EXAMPLES[example_name]["args"]
    kwargs = _EXAMPLES[example_name]["kwargs"]
    expected = _EXAMPLES[example_name]["expected"]

    monkeypatch.setenv("SETUPTOOLS_ENFORCE_DEPRECATION", "false")
    with pytest.warns(SetuptoolsWarning) as warn_info:
        SetuptoolsWarning.emit(*args, **kwargs)
    assert _get_message(warn_info) == cleandoc(expected)


def test_due_date_enforcement(monkeypatch):
    class _MyDeprecation(SetuptoolsDeprecationWarning):
        _SUMMARY = "Summary"
        _DETAILS = "Lorem ipsum"
        _DUE_DATE = (2000, 11, 22)
        _SEE_DOCS = "some_page.html"

    monkeypatch.setenv("SETUPTOOLS_ENFORCE_DEPRECATION", "true")
    with pytest.raises(SetuptoolsDeprecationWarning) as exc_info:
        _MyDeprecation.emit()

    expected = """
    Summary
    !!

            ********************************************************************************
            Lorem ipsum

            This deprecation is overdue, please update your project and remove deprecated
            calls to avoid build errors in the future.

            See https://setuptools.pypa.io/en/latest/some_page.html for details.
            ********************************************************************************

    !!
    """
    assert str(exc_info.value) == cleandoc(expected)


def _get_message(warn_info):
    return next(warn.message.args[0] for warn in warn_info)

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by KaizenLouie | C99Shell Github | Generation time: 0.0912 ]--