# Path: nosedjango/plugins/base_plugin.py
# class Plugin(NosePlugin):
#     django_plugin = True
#     _unique_token = None
# 
#     def get_unique_token(self):
#         """
#         Get a unique token for usage in differentiating test runs that need to
#         run in parallel.
#         """
#         if self._unique_token is None:
#             self._unique_token = self._random_token()
# 
#         return self._unique_token
# 
#     def _random_token(self, bits=128):
#         """
#         Generates a random token, using the url-safe base64 alphabet.
#         The "bits" argument specifies the bits of randomness to use.
#         """
#         alphabet = string.ascii_letters + string.digits + '-_'
#         # alphabet length is 64, so each letter provides lg(64) = 6 bits
#         num_letters = int(math.ceil(bits / 6.0))
#         return ''.join(random.choice(alphabet) for i in range(num_letters))


import logging
import os
import subprocess
import time
import nose.case
from ast import literal_eval
from pprint import pprint
from nosedjango.plugins.base_plugin import Plugin
    from urllib2 import URLError
    from urllib.error import URLError
    from httplib import BadStatusLine
    from http.client import BadStatusLine
        from selenium.webdriver import Firefox as FirefoxWebDriver
        from selenium.webdriver import Chrome as ChromeDriver
        from selenium.webdriver import Remote as RemoteDriver
            from selenium.webdriver.firefox.firefox_profile import FirefoxProfile  # noqa
                from selenium.webdriver.firefox.firefox_binary import FirefoxBinary  # noqa
    from selenium.common.exceptions import WebDriverException
            help='the path to the firefox browser binary',
            default=None,
        )
        parser.add_option(
            '--remote-server-address',
            help='Use a remote server to run the tests, must pass in the server address',  # noqa
            default='localhost',
        )
        parser.add_option(
            '--selenium-port',
            help='The port for the selenium server',
            default='4444',
        )
        parser.add_option(
            '--track-stats',
            help=(
                'After the suite is run print a table of test '
                'name/runtime/number of trips to the server.  defaults to '
                'ordering by trips to the server'
            ),
            default=None,
        )
        parser.add_option(
            '--ff-profile',
            help=(
                'Specify overrides for the FireFox profile'
            ),
            default=None,
            action='append'
        )

# Path: nosedjango/plugins/base_plugin.py
# class Plugin(NosePlugin):
#     django_plugin = True
#     _unique_token = None
# 
#     def get_unique_token(self):
#         """
#         Get a unique token for usage in differentiating test runs that need to
#         run in parallel.
#         """
#         if self._unique_token is None:
#             self._unique_token = self._random_token()
# 
#         return self._unique_token
# 
#     def _random_token(self, bits=128):
#         """
#         Generates a random token, using the url-safe base64 alphabet.
#         The "bits" argument specifies the bits of randomness to use.
#         """
#         alphabet = string.ascii_letters + string.digits + '-_'
#         # alphabet length is 64, so each letter provides lg(64) = 6 bits
#         num_letters = int(math.ceil(bits / 6.0))
#         return ''.join(random.choice(alphabet) for i in range(num_letters))


# Path: nosedjango/plugins/selenium_plugin.py
import logging
import os
import subprocess
import time
import nose.case
from ast import literal_eval
from pprint import pprint
from nosedjango.plugins.base_plugin import Plugin
    from urllib2 import URLError
    from urllib.error import URLError
    from httplib import BadStatusLine
    from http.client import BadStatusLine
        from selenium.webdriver import Firefox as FirefoxWebDriver
        from selenium.webdriver import Chrome as ChromeDriver
        from selenium.webdriver import Remote as RemoteDriver
            from selenium.webdriver.firefox.firefox_profile import FirefoxProfile  # noqa
                from selenium.webdriver.firefox.firefox_binary import FirefoxBinary  # noqa
    from selenium.common.exceptions import WebDriverException

            help='the path to the firefox browser binary',
            default=None,
        )
        parser.add_option(
            '--remote-server-address',
            help='Use a remote server to run the tests, must pass in the server address',  # noqa
            default='localhost',
        )
        parser.add_option(
            '--selenium-port',
            help='The port for the selenium server',
            default='4444',
        )
        parser.add_option(
            '--track-stats',
            help=(
                'After the suite is run print a table of test '
                'name/runtime/number of trips to the server.  defaults to '
                'ordering by trips to the server'
            ),
            default=None,
        )
        parser.add_option(
            '--ff-profile',
            help=(
                'Specify overrides for the FireFox profile'
            ),
            default=None,
            action='append'
        )

        Plugin.options(self, parser, env)