Saravanan666/pypi-org huggingface dataset:
Package: pytest-prosper
Pytest-ProsperHelper libraries for test coverage and general maintenance of services.  Making test coverage easier across Prosper projects!Quickstartsetup(...tests_require=['pytest-prosper',])Pytest-Prosper is suggested as atests_requireinstall.  Though there are some general use utilities, this library is not meant for production use.Featuresschema_utilsNoSQL is a powerful tool for web scraping, but can be difficult to keep traditional DBA tools running on.  Get alerted when major updates to data feeds occur without having to hand-craft JSONschemas for every source.PyTest Fixtures--secret-cfg: supports passing a secret template to a config file.  Supportsprosper.common.prosper_clisecret managementsecret_cfg: passes a config object with secrets filled outconfig: passes a config object (no secrets)config_file: apytest.inioption to source the correct configuration file
Package: pytest-prysk
Pytest-PryskWith thepytest-pryskplugin, prysk tests can be executed using pytests.This enables the usage of various pytests features like:The pytest test collection mechanismsExpression based test selection using the-kflagThe pytest test reportingMaking use of otherpytest pluginslikepytest-xdistfor parallel test executionHow to install the pytest pluginIn order to install prysk with pytest support, the extrapytest-plugin,
needs to be enabled. How this can be achieved depends or your package
management tool. Here are some examples:pip install prysk-pytestpoetry add pytest-pryskHow to run prysk tests with pytestOnce you installed the pytest-prysk plugin, it will use pytest mechanisms to collect your prysk tests.
So usually a simplepytestshould do the trick.Attention: In case you want to prevent pytest from running any prysk test just pass-p no:pryskto the pytest cli.
Package: pytest-pspec
Apspec formatreporter for pytestInstallpip install pytest-pspecUsageAdd the parameter–pspecwhen runningpytest. Ex:pytest --pspec your-tests/Tip: If you don’t want to type--pspecevery time you runpytest, add it
toaddoptsin yourini file. Ex:# content of pytest.ini# (or tox.ini or setup.cfg)[pytest]addopts=--pspecDemo CodeAdd the doc strings Ex:importunittestclassTestWayTwo(unittest.TestCase):"Pspec Python TDD"deftest_should_add(self):"it adds two integers and returns integer"self.assertEqual(2+2,4)deftest_should_find_difference_between_integers(self):self.assertEqual(4-2,2)runningpytest--pspecoutputsdemo
 ✓ it adds two integers and returns integer
 ✓ should find difference between integersConfiguration file optionspspec_formatSpecifies pspec report format,plaintextorutf8(default:utf8). Ex:# content of pytest.ini# (or tox.ini or setup.cfg)[pytest]pspec_format=plaintext$ pytest test_demo.py
============================= test session starts ==============================
platform darwin -- Python 3.5.0, pytest-3.0.7, py-1.4.33, pluggy-0.4.0
rootdir: /private/tmp/demo, inifile: pytest.ini
plugins: pspec-dev
collected 2 items

test_demo.py
Pytest pspec
 [x] prints a BDD style output to your tests
 [x] lets you focus on the behavior
Package: pytest-psqlgraph
An extension forpytestprovide useful tools for testing applications that usepsqlgraphHow to StartInstall dependencypip install pytest-psqlgraphDefine a session scopedpsqlgraph_configfixture inconftest.py:importpytest@pytest.fixture(scope="session")defpsqlgraph_config()->Dict[str,DatabaseDriverConfig]:return{"pg_driver":DatabaseDriverConfig(host="localhost",user="username",password="pword",database="db_name",model=active_model,dictionary=active_dictionary)}All set to start using the fixturepg_driveror whatever key was defined in the dictionary abovedeftest_something(pg_driver):withpg_driver.session_scoped()ass:s.add(Node(..))ContributingDon’t hesitate to create aGithub issuefor any bugs or suggestions or submit a PR.
Package: pytest-pudb
Pytest PuDB debugger integration based on pytestPDB integrationUse it as--pdbpy.testcommand argument:py.test --pudbOr simply usepudb.set_traceinside your python code:deftest_set_trace_integration():# No --capture=no needimportpudbpudb.set_trace()assert1==2deftest_pudb_b_integration():# No --capture=no needimportpudb.b# traceback is set up hereassert1==2See alsopytestandpudbprojects.History0.7.0 (2018-10-25)Added pu.db supportFixed pytest 3.7.3+ compatibilitySwitched to semantic versioningBuild package wheels0.6 (2018-02-13)Fixed pytest 3.3.1+ compatibility (by@noirbizarre)0.5 (2017-02-25)Fixed pypi package by adding MANIFEST.in0.4 (2017-02-24)Use post mortem on exception (by@Wilfred)0.2 (2016-09-24)Addedimport pytest.bsupport0.1 (2016-07-31)Public release
Package: pytest-pumpkin-spice
pytest-pumpkin-spiceFall in the Canada and the US comes once a year, and you know what that means: Autumn colours, cooler temperatures and, of course, pumpkin spice.Here's is a small pytest plugin to give your tests some pumpkin spice ☕.This project was heavily inspired bypytest-yukandpytest-emoji, developed byBrian OkkenandRaphael Pierzina, respectively.Installationpytest-pumpkin-spiceis available for Python 3. 🐍You can installpytest-pumpkin-spiceviapipfromPyPI:$ pip install pytest-pumpkin-spiceThis will automatically installpytestof version 4.2.1 or higher.FeaturesThis plugin adds a--pumpkin-spiceCLI flag to pytest, which replaces the standard test result outputs with a warm blend of pumpkin-spiced emoji, both fornormalandverbosemode.🎃 / PASSED 🎃for a passing test with a happy smile,❄️ / FAILED ❄️for a failed test with wintery reminder,🍂 / XFAIL 🍂for a xfailed test with some fallen leaves,🍠 / XPASS 🍠for a xpass with a sweet potato (almost pumpkin!),☕ / SKIPPED ☕for a skipped test with a pumpkin spiced hot bevarage, and🥧 / ERROR 🥧for an error with a nice big pumpkin pie.Normal mode with just a sprinkle of pumpkin spice blend:$ pytest --pumpkin-spicetests/test_emoji.py 🎃❄️🍂🍠☕🥧Verbose mode with some extra warmth and spice:$ pytest --verbose --pumpkin-spicetest_passed PASSED 🎃 ",
test_failed FAILED ❄️ ",
test_xfailed XFAIL 🍂 ",
test_xpassed XPASS 🍠 ",
test_skipped SKIPPED ☕ ",
test_error ERROR 🥧 *",LicenseDistributed under the terms of theMITlicense,pytest-pumpkin-spiceis
free and open source software
Package: pytest-purkinje
pytest-purkinjepy.test plugin for the purkinje test runner.
Seepukinje test runneron how
to get started.Build StatusBranchStatusdevmasterCoverage:Supported Python versionsPython 2.7.xPython 3.xpypyDevelopmentSetupClone other relevant purkinje-* packages, then:mkvirtualenv purkinje
workon purkinje
pip install --editable .Conventionsusessemantic versioningusesgit-flow git workflowGitHub pageChangeLogSome minor changes were omitted from this list. For details, see git log.Release 0.1.5Breaking change:replaced plugin parameterwebsocket_urlwithwebsocket_hostandwebsocket_port. Please update yourpytest.iniaccordingly if you use non-default settings for purkinje.Release 0.1.42015-03-03Sorted out Travis environment issuesRelease 0.1.32015-03-02Minor changesRelease 0.1.22015-03-01Sorted out Travis environment issuesRelease 0.1.12015-03-01Loosened version restriction on flotsam libRelease 0.1.02015-03-01Start of Development2014-12-11
Package: pytest-pycharm
Plugin forpytestto enter PyCharm debugger on uncaught exceptionsFree software: BSD licenseFeaturesUncaught exceptions inpytesttest cases will trigger the PyCharm
debuggerInstallationYou can install the plugin by runningpip install pytest-pycharmAlternately check out the source code and runpython setup.py installUsageYou are ready to go right after the plugin installation. Execute any test in
PyCharm by right-clicking on a test and selectingDebug pytest in …. The
debugger will pause on a false assertion (seetest example).The plugin also works with custompytestRun Configurations:Run | Edit Configurations | Add New Configuration | Python tests | pytest.Note:make sure the Run Configuration uses the correct interpreter withpytest-pycharminstalled.
Package: pytest-pycodestyle
pytest-pycodestylepytestplugin to runpycodestyleInstallationpipinstallpytest-pycodestyleUsagepytest--pycodestyle...For detail, please seepytest -hafter installation.ConfigurationThe behavior can be configured in the same style of pycodestyle.(cf.Configuration — pytest documentationandConfiguration — pycodestyle documentation)For example,[pycodestyle]
max-line-length = 127

[tool:pytest]
addopts = --pycodestyleLicenceThe MIT LicenseCopyright (c) 2019 OMOTO TsukasaAcknowledgmentspytest-dev / pytest-pep8 — Bitbucket
Package: pytest-pydev
With this plugin you can start a Python debug server on your local machine (say
on port 8042) and your unittests on another.py.test --pydevd=local-machine:8042Obviously, in this example, instead oflocal-machineyou use the appropriate
IP address.Apy.test--helpwill yield more information.Download and InstallationYou can install the plugin by runningpip install pytest-pydevAlternatively, get the latest stable version from PyPI or the latest
bleeding-edge archive from bitbucket.org.License and CreditsThis plugin is released under the MIT license. You can find the full text of the
license in theLICENSEfile.Copyright (C) 2012 Sebastian Rahlf <basti at redtoad dot de>
Package: pytest-pydocstyle
pytest-pydocstylepytestplugin to runpydocstyleInstallationpipinstallpytest-pydocstyleUsagepytest--pydocstyle...For detail, please seepytest -hafter installation.ConfigurationThe behavior can be configured in the same style of pydocstyle.(cf.Configuration — pytest documentationandConfiguration Files — pydocstyle documentation)For example,[pydocstyle]
convention = numpy
add-ignore = D400,D403

[tool:pytest]
addopts = --pydocstyleLicenceThe MIT LicenseCopyright (c) 2019 OMOTO TsukasaAcknowledgmentsabendebury/pytest-pep257
Package: pytest-pymysql-autorecord
pytest-pymysql-autorecordingA pytest plugin for recording database query results and mocking with the stored data.Mocking with real database dataIn principle, mocking database data is a good idea. But if your database is very complex, this may easily become tedious and may lack the richness of the real data.Testing with real data leads to another problem, though: You might not want to grant your CI/CD pipeline on, say, GitHub, access to a database.So this plugin offers a compromise. You still run tests against a real database, and you store the query results. The stored results can then be used by the CI/CD pipeline to mock the database queries.Using the pluginPlease refer to theQuickstart Guideto find out how to use the plugin.
Package: pytest-pypi
httpbin is an amazing web service for testing HTTP libraries. It has several
great endpoints that can test pretty much everything you need in a HTTP
library. The only problem is: maybe you don’t want to wait for your tests to
travel across the Internet and back to make assertions against a remote web
service.Enter pytest-httpbin. Pytest-httpbin creates a pytest “fixture” that is
dependency-injected into your tests. It automatically starts up a HTTP server
in a separate thread running httpbin and provides your test with the URL in the
fixture. Check out this example:deftest_that_my_library_works_kinda_ok(httpbin):assertrequests.get(httpbin.url+'/get/').status_code==200This replaces a test that might have looked like this before:deftest_that_my_library_works_kinda_ok():assertrequests.get('http://httpbin.org/get').status_code==200pytest-httpbin also supports https and includes its own CA cert you can use.
Check outthe full documentationon the github page.
Package: pytest-pypom-navigation
Core engine for cookiecutter QA packageThisPytestplugin was generated withCookiecutteralong with@hackebrot’sCookiecutter-pytest-plugintemplate.Featurespytest-pypom-navigationis not intended to be used as a standalone package.It provides the core engine (pytest fixtures) needed by the strong opinionated scaffolding solution
calledcookiecutter-qathat let you generate a fully working QA testing hello world project based on
Selenium/Splinter with just one command.It is also used by thepytest-playengine for collecting variables for tests parametrization.TestsYou can run “pytest-pypom-navigation” tests viatox:$ pip install tox
$ tox -epy36ContributingContributions are very welcome. Tests can be run withtox, please ensure
the coverage at least stays the same before you submit a pull request.LicenseDistributed under the terms of theApache Software License 2.0license, “pytest-pypom-navigation” is free and open source softwareIssuesIf you encounter any problems, pleasefile an issuealong with a detailed description.Changelog2.0.3 (2019-01-17)remove pytest 4.0 deprecationget_marker(still compatible with old versions)removed internal component parametrizer, use externalparametrizer.Parametrizernow2.0.2 (2018-04-01)make credentials and base url variables optional2.0.1 (2018-01-03)fixget_page_instance(missing page kwargs before page construction)2.0.0 (2018-01-02)navigation will no more be initialized automatically with an open
browser by default since pypom_navigation is used by third party
plugins even for non UI plugins. This way we avoid to open
a browser if it is not needed and explicitly requested with a
set page or visit pageyou can override the default page timeout using apytest-variablesconfiguration nameddefault_timeoutadd new methodget_page_instanceon navigation1.0.0 (2017-12-19)navigation initialized with kwargs (including variables
coming from pytest variables too)add global timeout for all pages (default 10)base_page fixture no longer opens page by default. It’s up to you
visiting a page now0.1.1 (2017-10-30)support fallback page classes in action_performed0.1.0 (2017-10-12)Add update_page and action_performed methods on navigation.Wait for pages to load when visiting them.0.0.1 (2017-06-13)First release
Package: pytest-pyramid
pytest_pyramidpytest_pyramid provides basic fixtures for testing pyramid applications with pytest test suite.By default, pytest_pyramid will create two fixtures: pyramid_config, which creates configurator based on config.ini file, and pyramid_app, which creates TestApp based on Configurator returned by pyramid_config.Command line options–pc- pyramid configuration file based on which pytest_pyramid will create test appUsageFor the most basic usage, pytest_pyramid provides pyramid_app and pyramid_config fixtures,
that can be used to test your pyramid app.
Simply pass your pyramid config*.inifile to–pccommand-line option,
and includepytest_appfixture into your test suite to be able to use it for
integration tests.Fixturespytest_pyramid provides two fixtures to be used in pytest tests:pyramid_config- fixture providing pyramid’s Configurator instance as
defined in pyramid config’s filepyramid_app- pyramid application for testing - awebtest.app.TestAppBoth of these fixtures depend on the Config file passed in the command line.Fixture factoriesIf you’re developing a module, package meant to extend functionalities of other
applications, it’s not necessary to create a full-blown application to test
functionalities provided in packages. To do this,pytest_pyramidprovides
you with fixturepytest_pyramid.factories.There are two factories:pytest_pyramid.factories.pyramid_configprovides you with Configuration object based on either settings, config_file argument, or by –pc command-line option config file.pytest_pyramid.factories.pyramid_appcreates awebtest.app.TestAppbased on Configurator class instance as returned from fixture passed by name to it. It also accepts additional fixtures that should be loaded before thepyramid_app. See the example withpostgresqlbelow.frompytest_postgresql.pluginimportpostgresqlfrompytest_pyramidimportfactoriesapp_config=factories.pyramid_config(config_path="development.ini")app_with_postgres=factories.pyramid_app("app_config","postgresql")deftest_pyramid_app(app_with_postgres):res=app_with_postgres.get('/',status=404)assertres.status_code==404TODOprovide a pyramid_proc fixture that will start pyramid app process using summon_processTestsTo run tests run this command:pytest –pc tests/pyramid.test.iniReleaseInstall pipenv and –dev dependencies first, Then run:pipenv run tbump [NEW_VERSION]
Package: pytest-pyreport
PyReportQuick overviewPyReport is a lightweight reporting plugin for Pytest that provides concise HTML reports by parsing JunitXML test resultsPre-requisitesTo be able to use this plugin you will need below dependencies that will be installed automatically with PyReport:Python >=3.7Jinja2PytestmatplotlibrequestslogstyleSupported MessengersTelegramSlackGetting startedInstallationTo start using PyReport please follow below instructions:Installpytest-pyreportplugin:pip install pytest-pyreport==<version>Report generationRun tests using below command to generate pyreport.html file with test results:pytest --junitxml=result.xml -o junit_family="xunit1" --pyreportRun tests using below command if you want to send Telegram notificationpytest --junitxml=result.xml -o junit_family="xunit1" --pyreport --telegram-pyreport <chat id> <bot token>Prerequisites:You need your own Telegram bot, which can be easily created using Telegram instructions.
You can take the “chat ID” and “bot token” from there.Run tests using below command if you want to send Slack notificationpytest --junitxml=result.xml -o junit_family="xunit1" --pyreport --slack-pyreport <webhook url> <channel id> <bot token>Prerequisites:You need your own Slack bot, which can be easily created using Slack instructions.
You can take the “webhook url”, "channel id" and “bot token” from there.Run tests using below command if you want to check generated report on the server if it is available:pytest --junitxml=result.xml -o junit_family="xunit1" --pyreport --telegram-pyreport <chat id> <bot token> --server <URL>
pytest --junitxml=result.xml -o junit_family="xunit1" --pyreport --slack-pyreport <webhook url> <channel id> <bot token> --server <URL>Prerequisites:You need to run server beforehand. As an example using CI/CD tools like Jenkins or GitHub ActionsTest resultsOnce test run completed you should seepyreport.htmlfile that auto generated by using above commands.Open it and check the test results as shown in below presentationPresentation
Package: pytest-pyright
⚠️ This project was created for internal use within another project of mine, support will be minimal.Pytest plugin for type checking code with Pyright.Thispytestplugin was generated withCookiecutteralong with@hackebrot’scookiecutter-pytest-plugintemplate.Why Should You Use it?pytest-pyright was created to ensure that complex types are correctly constrained, i.e will raise an error if used incorrectly.if your project makes use of any complex types you should find some value out pytest-pyright.InstallationYou can install “pytest-pyright” viapipfromPyPI:$ pip install pytest-pyrightUsageSee thedocumentationContributingContributions are very welcome. Tests can be run withtox, please ensure
the coverage at least stays the same before you submit a pull request.LicenseDistributed under the terms of theMITlicense, “pytest-pyright” is free and open source softwareIssuesIf you encounter any problems, pleasefile an issuealong with a detailed description.
Package: pytest-pyspec
Thepytest-pyspecplugin provides semantics to the pytest output. It
transforms the pytest's output into a result similar to the RSpec.The default pytest output is like the following:test/test_pytest.py::TestFunction::test_use_test_name PASSED
test/test_pytest.py::TestFunction::test_use_the_prefix_test PASSED
test/test_pytest.py::TestFunction::test_use_the_prefix_it PASSED
test/test_pytest.py::TestFunction::WithDocstring::test_use_docstring PASSEDThepytest-pyspectransforms the output into the following:A function
  ✓ use test name
  ✓ use the prefix test
  ✓ use the prefix it

A function
  with docstring
    ✓ use docstringYou just need to prefix your test case classes with:describe / testto represent objectswith / withoutto represent contextAnd prefix your tests with:it / testto represent objectsThe following is a sample test that generates the previous tests` output.classTestFunction:deftest_use_test_name(self):assert1==1deftest_use_the_prefix_test(self):assert1==1deftest_use_the_prefix_it(self):assert1==1classWithDocstring:deftest_use_docstring(self):assert1==1Moreover, you can use a docstring to overwrite the test description. The
following tests have the same output as the previous tests:classTestA:""" Function """deftest_1(self):""" use test name """assert1==1deftest_2(self):""" use the prefix test """assert1==1deftest_3(self):""" use the prefix it """assert1==1classTestB:""" with docstring """deftest_4(self):""" use docstring """assert1==1The following test sample:importpytestclassDescribeHouse:defit_has_door(self):assert1==1classWithTwoFloors:defit_has_stairs(self):assert1==1defit_has_second_floor(self):assert1==1defit_has_third_floor(self):assert1==2Generates the following output:test/test_sample.py 

A house
  ✓ has door

A house
  with two floors
    ✓ has stairs
    ✓ has second floor
    ✗ has third floorInstalling and runningpySpecpipinstallpytestpytest-pyspec
pytest--pyspec
Package: pytest-pystack
pytest-pystackA pytest plug-in for easy integration of PyStack in your test suite.It can be used to automatically dump the stack trace of a hanging test in your suite.SeePyStackfor further information about the tool.InstallationTo install the PyStack pytest plug-in, just run the following command in your venv:python -m pip install pytest-pystackQuick StartAfter you have installed the pytest plug-in, you can have PyStack monitor your test suite and output a stack trace if a test takes more than 5
seconds, simply by running pytest with argument--pystack-threshold=5.ConfigurationThe PyStack plug-in can be configured via the command line with the following options:--pystack-threshold: Enables the plug-in and monitors all tests,
generating a stack trace if they take longer than the specified
threshold. Note, this neither stops nor fails the test case after the specified threshold.--pystack-output-file: Appends PyStack output to a file.--pystack-path: Path to thepystackexecutable.--pystack-args: Additional args to pass topystack remote <pid>,
like--nativeor--native-all.And through any pytest config file, see an example ofpyproject.toml:[tool.pytest.ini_options]pystack_threshold=60pystack_path="custom-version-of-pystack"pystack_output_file="./pystack.log"pystack_args="--native"LicenseThis project is Apache-2.0 licensed, as found in theLICENSEfile.Code of ConductCode of ConductThis project has adopted a Code of Conduct. If you have any concerns about the Code, or behavior
that you have experienced in the project, please contact us atopensource@bloomberg.net.ContributingWe welcome your contributions to help us improve and extend this project!Below you will find some basic steps required to be able to contribute to the project. If you have
any questions about this process or any other aspect of contributing to a Bloomberg open source
project, feel free to send an email toopensource@bloomberg.netand we'll get your questions
answered as quickly as we can.Contribution LicensingSince this project is distributed under the terms of anopen source license,
contributions that you make are licensed under the same terms. For us to be able to accept your
contributions, we will need explicit confirmation from you that you are able and willing to provide
them under these terms, and the mechanism we use to do this is called a Developer's Certificate of
Origin(DCO). This is similar to the
process used by the Linux kernel, Samba, and many other major open source projects.To participate under these terms, all that you must do is include a line like the following as the
last line of the commit message for each commit in your contribution:Signed-Off-By: Random J. Developer <random@developer.example.org>The simplest way to accomplish this is to add-sor--signoffto yourgit commitcommand.You must use your real name (sorry, no pseudonyms, and no anonymous contributions).StepsCreate an Issue, select 'Feature Request', and explain the proposed change.Follow the guidelines in the issue template presented to you.Submit the Issue.Submit a Pull Request and link it to the Issue by including "#" in the Pull Request
summary.