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

Software: nginx/1.23.4. PHP/5.6.40-65+ubuntu20.04.1+deb.sury.org+1 

uname -a: Linux foro-restaurado-2 5.15.0-1040-oracle #46-Ubuntu SMP Fri Jul 14 21:47:21 UTC 2023
aarch64
 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/usr/lib/python3/dist-packages/hyperlink/test/   drwxr-xr-x
Free 83.26 GB of 96.73 GB (86.08%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     test_common.py (3.59 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
"""
Tests for hyperlink.test.common
"""
from typing import Any
from unittest import TestCase
from .common import HyperlinkTestCase


class _ExpectedException(Exception):
    """An exception used to test HyperlinkTestCase.assertRaises."""


class _UnexpectedException(Exception):
    """An exception used to test HyperlinkTestCase.assertRaises."""


class TestHyperlink(TestCase):
    """Tests for HyperlinkTestCase"""

    def setUp(self):
        # type: () -> None
        self.hyperlink_test = HyperlinkTestCase("run")

    def test_assertRaisesWithCallable(self):
        # type: () -> None
        """HyperlinkTestCase.assertRaises does not raise an AssertionError
        when given a callable that, when called with the provided
        arguments, raises the expected exception.

        """
        called_with = []

        def raisesExpected(*args, **kwargs):
            # type: (Any, Any) -> None
            called_with.append((args, kwargs))
            raise _ExpectedException

        self.hyperlink_test.assertRaises(
            _ExpectedException, raisesExpected, 1, keyword=True
        )
        self.assertEqual(called_with, [((1,), {"keyword": True})])

    def test_assertRaisesWithCallableUnexpectedException(self):
        # type: () -> None
        """When given a callable that raises an unexpected exception,
        HyperlinkTestCase.assertRaises raises that exception.

        """

        def doesNotRaiseExpected(*args, **kwargs):
            # type: (Any, Any) -> None
            raise _UnexpectedException

        try:
            self.hyperlink_test.assertRaises(
                _ExpectedException, doesNotRaiseExpected
            )
        except _UnexpectedException:
            pass

    def test_assertRaisesWithCallableDoesNotRaise(self):
        # type: () -> None
        """HyperlinkTestCase.assertRaises raises an AssertionError when given
        a callable that, when called, does not raise any exception.

        """

        def doesNotRaise(*args, **kwargs):
            # type: (Any, Any) -> None
            pass

        try:
            self.hyperlink_test.assertRaises(_ExpectedException, doesNotRaise)
        except AssertionError:
            pass

    def test_assertRaisesContextManager(self):
        # type: () -> None
        """HyperlinkTestCase.assertRaises does not raise an AssertionError
        when used as a context manager with a suite that raises the
        expected exception.  The context manager stores the exception
        instance under its `exception` instance variable.

        """
        with self.hyperlink_test.assertRaises(_ExpectedException) as cm:
            raise _ExpectedException

        self.assertTrue(  # type: ignore[unreachable]
            isinstance(cm.exception, _ExpectedException)
        )

    def test_assertRaisesContextManagerUnexpectedException(self):
        # type: () -> None
        """When used as a context manager with a block that raises an
        unexpected exception, HyperlinkTestCase.assertRaises raises
        that unexpected exception.

        """
        try:
            with self.hyperlink_test.assertRaises(_ExpectedException):
                raise _UnexpectedException
        except _UnexpectedException:
            pass

    def test_assertRaisesContextManagerDoesNotRaise(self):
        # type: () -> None
        """HyperlinkTestcase.assertRaises raises an AssertionError when used
        as a context manager with a block that does not raise any
        exception.

        """
        try:
            with self.hyperlink_test.assertRaises(_ExpectedException):
                pass
        except AssertionError:
            pass

:: 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 HackingTool | HackingTool | Generation time: 0.0045 ]--