Saravanan666/pypi-org huggingface dataset:
Package: nose2-spark
nose2plugin to run the tests with support of pyspark (Apache Spark).Features:Make “pyspark” importable in you code executed by nose2.Add a list ofpy-filesdependencies of your pyspark application (which
is usually supplied as an optionspark-submit--py-files...).Install$pipinstallnose2-sparkUsageLoad “nose2-spark” plugin into nose2 by creatingnose2.cfgin your project
directory:[unittest]
plugins = nose2_sparkRun tests with nose2-spark activated (pyspark and friends are added to
pythonpath):$ nose2 --pysparknose2-spark will try to import pyspark by looking into:SPARK_HOME environment variableSome common Spark locations.You can set it manually in case if all of mentioned methods are failing
to find Spark. Add section “nose2-spark” tonose2.cfg:[nose2-spark]
spark_home = /opt/sparkYou can add a list of requiredpy-filesto run your code:[nose2-spark]
pyfiles = package1.zip
          package2.zipExampleExample ofnose2.cfgwith spark_home defined, onepy-filesdependency and
auto activating nose2-spark plugin:[unittest]
plugins = nose2_spark

[nose2-spark]
always-on = True
spark_home = /opt/spark
pyfiles = package1.zipThis will allow to run tests by single command:$ nose2
Package: nose2-test-timer
# nose2-test-timerA timer plugin for nose2 to benchmark time that each unit test takePorted from nose-timer. Functionality should be mostly but not yet entirely the same### InstallTo install the latest development version from Git:pip install git+https://github.com/kaichiachen/nose2-test-timer.gitOr to install the latest from source:git clone https://github.com/kaichiachen/nose2-test-timer.git
cd nose2_test_timer
pip install .You can also make a developer install if you plan on modifying the
source frequently:pip install -e .###  Usageexample:nose2 -v -s ./example --plugin=nose2_test_timer.plugin --with-timer --timer-json-file './result.json' --timer-color --timer-top-n 20![](./images/colorexample.png)usage:usage: nose2 [--with-timer] [--timer-top-n TIMER_TOP_N]
         [--timer-json-file TIMER_JSON_FILE] [--timer-ok TIMER_OK]
         [-W TIMER_WARNING] [--timer-color]
         [--timer-threshold TIMER_THRESHOLD]
         [--timer-typefilter TIMER_TYPEFILTER]### Licensenose2-test-timeris MIT Licensed library.
Package: nose2-timer
nose2-timer==========A timer plugin for nose2 that answers the question: *how much time does every test take?*Ported from nose-timer. Functionality should be mostly but not yet entirely the sameThe original documentation can be found in README_nose-timer.rst and may provide usage hints where missing from this document.That document also includes the list of original ContributorsInstall-------To install the latest development version from Git::pip install git+git://github.com/mahmoudimus/nose-timer.gitOr to install the latest from source::git clone https://github.com/mahmoudimus/nose-timer.gitcd nose-timerpip install .You can also make a developer install if you plan on modifying thesource frequently::pip install -e .Usage-----Coming soon...License-------``nose-timer`` is MIT Licensed library.Contribute----------Coming soon...Contributors------------See CONTRIBUTORS
Package: nose2unitth
nose2unitthConvertnose-style XML test reports toUnitTH-compatible XML reportsExamplenose-style XML reportUnitTH-style XML reportUnitTH HTML test history
reportInstallationLatest release from PyPIpip install nose2unitthLatest revision from GitHubpip installgit+https://github.com/KarrLab/nose2unitth.git#egg=nose2unitthUsage# convert nose-style reports to UnitTH-style reports
nosetests <package-to-test> --with-xunit --xunit-file=examples/nose.xml

mkdir -p examples/unitth
nose2unitth examples/nose.xml examples/unitth/1
nose2unitth examples/nose.xml examples/unitth/2

junit2html examples/nose.xml examples/unitth/1/index.html
junit2html examples/nose.xml examples/unitth/2/index.html

# generate HTML test report
java \
    -Dunitth.generate.exectimegraphs=true \
    -Dunitth.xml.report.filter= \
    -Dunitth.html.report.path=. \
    -Dunitth.report.dir=examples/html \
    -jar unitth.jar examples/unitth/*DocumentationPlease see the documentation atRead the
Docs.TestsRunning the testsnosecan be used to run the tests:nosetests tests \
  --with-xunit --xunit-file=test-report.xml \
  --with-coverage --cover-package=nose2unitthPlease note that additional packages are required for testing (seetests/requirements.txt).LicenseThe example model is released under theMIT license.Development teamnose2unitthwas developed byJonathan
Karrat the Icahn School of Medicine at
Mount Sinai in New York, USA.Questions and commentsPlease contact theJonathan Karrwith any
questions or comments.
Package: nose3
nose3 is a fork of nose v1 not using lib2to3 for compatibility with Python 3.nose extends the test loading and running features of unittest, making
it easier to write, find and run tests.By default, nose will run tests in files or directories under the current
working directory whose names include “test” or “Test” at a word boundary
(like “test_this” or “functional_test” or “TestClass” but not
“libtest”). Test output is similar to that of unittest, but also includes
captured stdout output from failing tests, for easy print-style debugging.These features, and many more, are customizable through the use of
plugins. Plugins included with nose provide support for doctest, code
coverage and profiling, flexible attribute-based test selection,
output capture and more. More information about writing plugins may be
found on in the nose API documentation, here:http://readthedocs.org/docs/nose/If you encounter any problems, please raise an issue at:https://github.com/jayvdb/nose3
Package: nose-alert
A Nose plugin that displays success/failure notification once tests are done.InstallationUsual thing:pip install nose-alertHow to useIn order to use this plugin use the--with-alertswitch:nosetests --with-alertIf you usewatchdogyou can also run at your project’s root directory:watchmedo shell-command -R -p "*.py" -c "nosetests --with-alert" .This would call nose on file changes within your project.Supported platformsCurrently this plugin supports onlygrowlon OS X. We are going to add support
for Linux based notifications in future (pull requests are welcome!).PlansShort plan is to provide a nose plugin that can show OS level notification at
tests end. Long plan, however, is to support main platforms (OS X, Linux,
Windows), eventually extract library for OS-independant notifications to
external package.We also will try to support Python 3, this however could be somewhat problematic
- i.e.gntpdoesn’t support Python 3 yet.DevelopmentWe usetoxfor tests. Repository is athttps://github.com/lukaszb/nose-alert/.
We prefer pull requests for sending patches.In order to start tests run at project root:$ nosetestsThanksThanks to Pascal Hartig, author ofnose-notifyfor the inspiration. I have
even bluntly used images from his package.
Package: nose-allure-plugin
Allure Nose AdaptorIt is a port ofpytest-allure-adaptorfornose framework.Usagenosetests--with-allure--logdir=/path/to/put/resultsnosetests--with-allure--logdir=/path/to/put/results--not-clear-logdirOption “–not-clear-logdir” is useful with option “–processes” to prevent cleaning of logdr at the end of testing.Supported featuresAttachmentTo attach some content to test report:importnosedeftest_foo():nose.allure.attach('my attach','Hello, World')StepTo divide a test into steps:importnosedeftest_foo():withnose.allure.step('step one'):# do stuffwithnose.allure.step('step two'):# do more stuffCan also be used as decorators. By default step name is generated from method name:importnose@nose.allure.stepdefmake_test_data_foo():# do stuffdeftest_foo():assertmake_some_data_foo()isnotNone@nose.allure.step('make_some_data_foo')defmake_some_data_bar():# do another stuffdeftest_bar():assertmake_some_data_bar()isnotNoneEnvironmentYou can provide testenvironment parameterssuch as report name, browser or test server address to allure test report.importnosedeftest_dummy():nose.allure.environment(report='Allure report',browser=u'Firefox')SeverityAny test, class or module can be marked with different severity:importnoseclassTestBar(object):@nose.allure.severity(nose.allure.severity_level.CRITICAL)deftest_bar(self):pass# custom severity@nose.allure.severity("hard")deftest_bar(self):passTo run tests with concrete priority:nosetestsmy_tests/--with-allure--logdir=tmp--severity="critical, hard"IssueIssues can be set for test.importnose@nose.allure.issue('http://jira.lan/browse/ISSUE-1')deftest_foo():assertFalseFeatures & StoriesFeature and Story can be set for test.importnose@nose.allure.feature('Feature1')@nose.allure.story('Story1')deftest_minor():assertFalseclassTestBar(object):@nose.allure.feature('Feature2')@nose.allure.story('Story1')deftest_bar(self):passTo run tests by Feature or Story:nosetestsmy_tests/--with-allure--logdir=tmp--feature="Feature1, Feature2"nosetestsmy_tests/--with-allure--logdir=tmp--feature="Feature1, Feature2"--story="Story1, Story2"
Package: noseapp
Vacancy is open (for russian only):http://hh.ru/vacancy/13540190Installationpip install noseappAboutThis is framework for test development with complex logic around and based on nose library.Featuresapplication is entry point to test programReal suite objects. Yes, it’s true! :)Installing extensions to expand test programSeveral strategies for async runChain of callbacks to setup, teardown (app, suite, test case)Chain of callbacks to pre, post run test caseLinksTo see docs:http://pythonhosted.org/noseapp/We offer our extensions to usage:noseapp_selenium -https://pypi.python.org/pypi/noseapp_selenium(for UI testing)noseapp_daemonhttps://pypi.python.org/pypi/noseapp_daemon(for linux daemon testing)noseapp_requestshttps://pypi.python.org/pypi/noseapp_requests(wrapper on requests library)noseapp_alchemy -https://pypi.python.org/pypi/noseapp_alchemy(wrapper on sqlalchemy library)
Package: noseapp_alchemy
pip install noseapp_alchemyInstall extension from appconfig modulefrom noseapp.ext.alchemy.mysql_ex import make_config

MY_DB = make_config()

MY_DB.configure(
    host='127.0.0.1',
    port=3306,
    user='root',
    password='',
    db='target',
    protocol='mysql',
    # pool_size=POOL_SIZE,
    # pool_class=POOL_CLASS,
    # strategy=ENGINE_STRATEGY,
    # max_overflow=MAX_OVERFLOW,
    # bind_key=DB_BIND_KEY,
)

ALCHEMY_EX_MYSQL = (
    MY_DB,
)

ALCHEMY_EX_SESSION = {}

etc...app modulefrom noseapp import NoseApp
from noseapp.ext.alchemy import MySQLEx


class MyApp(NoseApp):

    def initialize(self):
        MySQLEx.install(self)suitefrom noseapp import Suite
from noseapp import TestCase


suite = Suite(__name__, require=['mysql'])


class MyTestCase(TestCase):

    def setUp(self):
        self.db = self.mysql.get_client()
        # get by bind key
        self.db = self.mysql.get_client('bind key')

    def test(self):
        with self.db.read() as execute:
            result = execute('SELECT 1').fetchone()
        self.assertTrue(result)Usage ORMfrom sqlalchemy import Column
from sqlalchemy import String
from sqlalchemy import Integer

from noseapp.ext.alchemy.orm import BaseModel


class MyModel(BaseModel):
    class Meta:
        # bind = 'bind key from db settings'
        table = 'table name'

id = Column(Integer, autoincrement=True, nullable=False, primary_key=True)
name = Column(String(255), nullable=False, default='Name')Create new objectobj = MyModel.create(name='Hello World!')Update objectobj = MyModel.objects.get(1)
obj.update(name='Hello!')Get objects byobjects = MyModel.objects.getlist_by(name='Hello')
obj = MyModel.objects.get_by(name='Hello')Etc…See orm module…
Package: noseapp_daemon
Installationpip install noseapp_daemonCreate Runnerfrom noseapp.ext.daemon import DaemonRunner

class MyPythonDaemon(DaemonRunner):

    CMD_PREFIX = 'python'
    DAEMON_BIN = '/path/to/daemon/daemon.py'


my_daemon = MyPythonDaemon('my_daemon')
my_daemon.add_cmd_option('-c', '/path/to/config')
my_daemon.start()Create daemon pluginfrom noseapp.ext.daemon import DaemonPlugin


class MyPythonDaemonPlugin(DaemonPlugin):

    def init(self, daemon):
        # do something

    def before_start(self, daemon):
        # do something

    def after_start(self, daemon):
        # do something

    def before_stop(self, daemon):
        # do something

    def after_stop(self, daemon):
        # do something


my_daemon = MyPythonDaemon('my_daemon', plugin=MyPythonDaemonPlugin())Create Servicefrom noseapp.ext.daemon import DaemonService

class MyDaemonService(DaemonService):

  name = 'my_service'

  def setup(self):
      self.daemon = MyPythonDaemon('my_daemon')

  def start(self):
      self.daemon.start()

  def stop(self):
      self.daemon.stop()

  ...


service = MyDaemonService()
service.start()
service.restart()Create Managementfrom noseapp.ext.daemon import DaemonManagement

management = DaemonManagement(app)
management.add_daemon(
    MyPythonDaemon('my_daemon', plugin=MyPythonDaemonPlugin()),
)
daemon = management.daemon('my_daemon')

def error_handler(daemon, e):
    # do something

with management.checkout_daemon('my_daemon', except_exc=Exception, error_handler=error_handler) as daemon:
    daemon.restart()

management.add_service(MyDaemonService())
service = management.service('my_service')

# to install as extension
management.install(app)

suite = Suite(__name__, require=['my_daemon'])

# management.stop_all()
# management.stop_daemons()
# management.stop_services()
# management.restart_all()
# etc ...Presetsnoseapp.ext.daemon.presets import NGINXDaemon
noseapp.ext.daemon.presets import UWSGIDaemon
...


nginx = NGINXDaemon()
uwsgi = UWSGIDaemon()

nginx.add_cmd_option('-c', '/path/to/config')
uwsgi.add_dmd_option('--ini', '/path/to/config')

nginx.start()
uwsgi.start()
...
Package: noseapp_requests
Requests/Requests-Oauthlib extension for NoseApp libraryInstallationpip install noseapp_requestsUsagefrom noseapp.ext.requests import RequestsEx, make_config

endpoint = make_config()
endpoint.configure(
  base_url='http://httpbin.org/',
  key='httpbin'
)
endpoint.session_configure(
  always_return_json=True,
  raise_on_http_error=True
)
requests_ex = RequestsEx(endpoint)
api = requests_ex.get_endpoint_session('httpbin', auth=('user', 'pass'))
api.get('basic-auth/user/pass')
api.get('get', key1='val1') # GET with query-string parameters
api.post('post', key1='val1') # POST form-encoded data
api.post('post', {'key1': 'val1'}) # POST JSON data
api.get('status/400') # raises HTTPErrorDocumentationhttp://noseapp-requests.readthedocs.org/
Package: noseapp_workspace
pip install noseapp_workspaceUsageExtension for control by file system from your test application.Example:ws = WorkSpace(
    '/path/to/entry/point/',
    permissions=(
        Permissions.CREATE_FILE,
        Permissions.CREATE_DIRECTORY,
    ),
)

bin = ws.go_to('bin')
daemon_bin = bin.path_to_bin('daemon')

logs = ws.go_to('logs')
logs.is_file('daemon.log')
logs.create_file('new.log') or logs.create_log_file('new')

tmp = ws.create_dir('tmp')
ws.is_dir('tmp')
tmp.create_file('new_tmp.tmp', content='Hello World!')


child_ws = ws.child_workspace('new_workspace')
...

See full api of noseapp_workspace.WorkSpaceMust be installed like extension:WORKSPACE_EX = create_workspace_config(
    '/path/to/entry/point/',
    permissions=(
        Permissions.CREATE_FILE,
        Permissions.CREATE_DIRECTORY,
    ),
)

WorkSpace.install(app)

suite = Suite(__name__, require=['workspace'])
Package: nose-audio
Add audio to your test suite.Simply$ pip installnose-audioand yournosetestscome alive!Options--no-audioTurn off musical tests; disable the plugin.--audio-busyThe path to an audio file to play while tests are running.--audio-successThe path to an audio file to play when tests succeed.--audio-failureRuh-roh.  Path to an audio file to play when tests fail.Those options can also be set in asetup.cfgfile:[nosetests]
audio-busy='~/music/alt/elevator.ogg'
audio-success='~/music/alt/yes.wav'
audio-failure='~/music/alt/sad-trombone.wav'LicenseNoteThis tarball includes audio assets for which the author does not
hold copyright.
Package: nose-autochecklog
This nose plugin is very simple, which is for users who use test_steps in nose framework.
Use this plugin, the function detection mechanism is using nose prepareTestCase to do it, instead of
using the original mechanism, which requires users know more about the auto-function-detection while
writing scripts originally.Install nose-autochecklogpip install nose-autochecklogUsingGiven the following tests (suppose it is in file /test_steps_example/test1.py)fromtest_stepsimport*importrandomdeftest_example():ok("just pass the check and log it")#fail("Just fail the check and log it")ok(3+2==5,"pass if expr else fail")#eq("Shanghai", "Beijing", "Shanghai not equal to Beijing")eq(4+5,9)ne("Shanghai","Beijing","Pass, Shanghai not equal to Beijing")#'Shanghai City' contains 'Country', the second parameter could be regexcheck(" 'Shanghai City' =~ 'Country' ",warning=True)unmatch("Shanghai City","Country","Pass, not contains, regex can be used too")check('random.uniform(1,20) > 15',repeat=5)running it with nosetest using nose-autochecklog plugin:nosetests --with-autochecklogThen, you will get the following log in logfile /tmp/test_yyyymmdd_hhmm.log by default like:Steven-Mac:tmp Steven$ cat test_20150124_1545.log
2015-01-24 15:45:11,184 - INFO - ------------------------------------------------------
2015-01-24 15:45:11,197 - INFO - Func test_example in file: /test_steps_example/test1.py
2015-01-24 15:45:11,198 - INFO - Check-1: just pass the check and log it -PASS-
2015-01-24 15:45:11,198 - INFO - Check-2: pass if expr else fail -PASS-
2015-01-24 15:45:11,198 - INFO - Check-3: 9 == 9 -PASS- 9 == 9?
2015-01-24 15:45:11,199 - INFO - Check-4: Pass, Shanghai not equal to Beijing -PASS- 'Shanghai' != 'Beijing'?
2015-01-24 15:45:11,202 - INFO - Check-5: 'Shanghai City' =~ 'Country' -PASS- 'Shanghai City' =~ 'Country'
2015-01-24 15:45:11,202 - WARNING -   ^^^  condition not met (pass due to -w option set)  ^^^
2015-01-24 15:45:11,203 - INFO - Check-6: Pass, not contains, regex can be used too -PASS- 'Shanghai City' !~ 'Country'?
2015-01-24 15:45:13,204 - DEBUG -    vvv  Results(-r 5 set) { 1:<11.960281812565919 > 15>  2:<12.284208523480407 > 15>  3:<15.89909604817515 > 15>  }  vvv
2015-01-24 15:45:13,204 - INFO - Check-7: random.uniform(1,20) > 15 -PASS- 15.89909604817515 > 15 - tried 3 times in 5 secondsBtw, you can change the log file and format by using test_steps functions.See how to use check functions from test_steps modulehttps://pypi.python.org/pypi?:action=display&name=test_steps
Package: nose-blacklist
nose-blacklist is a plugin fornosethat provides a powerful way of skipping
tests without requiring code changes.Test cases are excluded by regex matchingTests cases are matched by their fully-qualified names, including the module,
class, and function/method names.Tests to skip can be sourced from one or more files, or from cli argumentsQuickstart$pipinstallnose-blacklist$nosetests--with-blacklist\--blacklist=<pattern1>\--blacklist=<pattern2>\mytests/Blacklist strings can be specified from one or more files. Blacklist files can
be used in conjunction with the--blacklistarguments.$catblacklist.txttest_thing# test_other_thingtest_third_thing$nosetests--with-blacklist\--blacklist-file=blacklist.txt\mytests/The blacklist file should have a single pattern per line, as above. Any line
starting with a#is commented and will be ignored.
Package: nose-blockage
An experimental nose plugin to block access to external services that you
really should not be accessing in your unit tests.To use:pip install nose-blockageThen add the following to your tests:--with-blockageBlocking HTTPBy default it whitelistslocalhostand127.0.0.1. To change the whitelist:--http-whitelist=some.site,some.other.siteIf the code hits a http connection then instead of completing it will raise a
MockHTTPCall exception. Please go and mock your tests appropriately.Blocking SMTPBy default it whitelists no domains. To change the whitelist:--smtp-whitelist=some.siteIt will raise a MockSMTPCall exception.
Package: nosebook
anoseplugin for finding and running
IPython 2/3 notebooks as nose tests.What it can’t do in terms ofsetupandtearDown,nosebookmakes up for in simplicity: there is no%%nosemagic, no metadata
required: the notebook on disk is the “gold master”.This makes it ideal for decreasing the burden of keeping documentation
up to date with tests by making a single set of notebooks into both
rich, multi-format documentation and a simple part of your test suite.How does it work?Each notebook found according to`nosebook-match<#nosebook-match>`__ is started with a fresh kernel,
based on the kernel specified in the notebook. If the kernel is not
installed, no tests will be run and the error will be logged.Eachcodecell that matches`nosebook-match-cell<#nosebook-match-cell>`__ will be executed
against the kernel in the order in which it appears in the notebook:
other cells e.g.markdown,raw, are ignored.The number and content of outputs has tomatch exactly, with the
following parts of each output stripped:execution/prompt numbers, i.e.[1]:tracebacksNon-deterministic output, such as with_repr_methods that include
the memory location of the instance, will obviously not match every
time. You can use`nosebook-scrub<#nosebook-scrub>`__ to rewrite or
remove offending content.Related work`ipython_nose<http://github.com/taavi/ipython_nose>`__ allows
you to use a notebook as a nose runner, with traditionaltest_whatevermethods. You can sort of emulate this behavior with`nosebook-match-cell<#nosebook-match-cel>`__… as long as you
check in passing tests!Configuringnoseteststo usenosebookThese options can be specified in yournose config file,
or as long-form command line arguments, i.e.--with-nosebook.with-nosebooknosetestswill look for notebooks that seem like tests, as
configured with`nosebook-match<#nosebook-match>`__.Default: False# Basic usage!nosetests--with-nosebooknosebook-matchA regular expression that tells nosebook what should be a testable
notebook.Default: ``.*[Tt]est..ipynb$``*# Run against all notebooks... probably not a good idea, but maybe a great idea!nosetests--with-nosebook--nosebook-match.*.ipynbnosebook-match-cellA regular expression that will be replaced throughout the expected
outputs and generated outputs.Default: None# will run cells where tests are defined... but you should probably run them, too!nosetests--with-nosebook--nosebook-match.*Simple.*--nosebook-match-cell'(def|class).*[Tt]est'nosebook-scrubA regular expression that will be replaced throughout the expected
outputs and generated outputs.Default: None# you can't fail if you don't try!nosetests--with-nosebook--nosebook-scrub.+For multiple scrub values, you can pass a JSON-formatted list of regular
expressions or object of pattern-replacement pairs that will be
replaced. When passed in via the command line, you’ll have to escape
special characters: using a.nosercconfig file makes this easier.# there are only 10 kinds of tests...!nosetests--with-nosebook--nosebook-scrub='["0", "1"]'# 0 is equally good!nosetests--with-nosebook--nosebook-scrub='{"\\d+": "0"}'ContributingIssuesandpull
requestswelcome!Licensenosebookis released as free software under theBSD 3-Clause
license.