Saravanan666/pypi-org huggingface dataset:
Package: pytest-couchdbkit
pytest-couchdbkitpytest-couchdbkit is a simple pytest extension that manages test databases
for your couchdbkit using apps.In order to use it, you only need to set the ini optioncouchdbkit_suffixto something fitting your app.
Additionally you may usecouchdbkit_backendto select
the gevent/eventlet backends.To setup couchapps before running the tests,
there is thepytest_couchdbkit_push_app(server, dbname)hookIt can be used to create a pristine database,
which is replicated into each test database.The provided funcargcouchdbwill be a freshly flushed database
namedpytest_+ couchdbkit_suffix,additionally, after each test item,
the database will be dumped to tmpdir.join(couchdb.dump)which is a simple file having entries in the format:number(\d+) + "\r\n" + number bytes + "\r\n"entries are:the db infodocumentsraw attachment data following the documentAttachments are ordered by name,
so they can be reassigned to their metadata on loading.The dump format is meant to be human-readable.Futurefs fixtures (like couchapp)code fixturesdump fixturescomaring a db to sets of defined fixturesCHANGELOGfrom 0.5 to 0.5.1fix MANIFEST.infrom 0.4 to 0.5fix breaking testruns that dont actually use itadd a lot of tests i should have done before 0.4add support for pytest-xdist,
if a slave is detected, push_app wont be called,
and dbname gets the gw id appendedfrom 0.3 to 0.4add pytest_couchdbkit_push_app hookfrom 0.2 to 0.3switch dump format to chunked encodingpretty json in dumpsattachments in dumpsutility functions for loading dumps back to a databasefrom 0.1 to 0.2use json-lines as extension for the dumpcondense json to one line per document for humanly acceptable parsinigfail if no couchdbkit_prefix is set0.1initial stuff
Package: pytest-count
count erros and send emailThisPytestplugin was generated withCookiecutteralong with@hackebrot’sCookiecutter-pytest-plugintemplate.FeaturesTODORequirementsTODOInstallationYou can install “pytest-count” viapipfromPyPI:$ pip install pytest-countUsageTODOContributingContributions 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-count” is free and open source softwareIssuesIf you encounter any problems, pleasefile an issuealong with a detailed description.
Package: pytest-cover
pytest-coverhas been merged back intopytest-cov 2.0.Changelog2.0.2 (2015-07-08)Fixed a race condition when running with xdist (all the workers tried to combine the files).2.0.1 (2015-07-06)Avoid warning about missing coverage data (just likecoverage.control.process_startup).Don’t setup the multiprocessing finalizer if there’s no coverage active.2.0.0 (2015-06-29)Renamed--cov-minto--cov-fail-underto be consistent with the newfail_underoption incoverage-4.0.Changed--cov-report=termto automatically upgrade to--cov-report=term-missingif there’s[run] show_missing = Truein.coveragerc.Changed--cov-fail-underto be automatically activated if there’s a[report] fail_under = ...in.coveragerc.1.0.0 (2015-06-05)Fixed.pthinstallation to work in all cases (install, easy_install, wheels, develop etc).Fixed.pthuninstallation to work for wheel installs.Reverted the unreleased--cov=pathdeprecation.Removed the unreleased addition of--cov-source=path.Forked from the2.0branch ofhttps://github.com/schlamar/pytest-cov/- fixes include:No need to specify the source anymore via--cov. The source settings from.coveragercwill be used instead.Support for--cov-min.
Package: pytest-cov-exclude
Coverage-based test exclusion plugin forpytest. By looking at which
lines are executed by each test, the next test run can be sped up bynotexecuting the tests where no source files have changed.If you have a large test suite which you often re-run, this plugin can
drastically improve the iteration times.InstallationInstall with pip:$ pip install pytest-cov-excludepytest-cov-excluderequires Pytest 2.8 or later. It is compatible with
Python 2.7, 3.3, 3.4, 3.5, as well as PyPy. It doesnotwork on PyPy
3 due to an unknown bug with the coverage data generated.UsageThe first time you run your test suite, per-test coverage is enabled
and the suite will take alittle bitlonger than usual:$ py.test

==================== test session starts =====================

# Test output...

================ MANY passed in MANY seconds =================Now when you re-run the test suite, all tests should have been
excluded:$ py.test

==================== test session starts =====================

# Test output...

=============== MANY deselected in FEW seconds ===============If a test fails, it will re-run even if nothing changed in order to
preserve the general failure status of the test suite.Forcing individual test inclusionIf you have tests that depend on files not included in coverage data,
such as data files or generated sources, you can mark the tests withexternal_dependencies. This forces them to be re-run even if no
files were changed:@pytest.mark.external_dependenciesdeftest_something():# Run tests from external data filesKnown bugsChanges to files during pytest’s collection phase will be
ignored. Test files and their dependencies are scanned as soon as
possibleafterthe test collection is complete.There is a test case markedxfailthat highlights this issue.Running the whole test suiteIf you want to force a complete re-run of the whole test suite, you
have two options: either disable the plugin, or clear pytest’s cache:$ py.test -p no:cov-exclude  # Disable the plugin

$ py.test --cache-clear  # Clear pytest's cacheCompatibilityAs stated earlier, this plugin requires Pytest 2.8 or later since it
depends on the new cache module.While PyPy is supported, theujsonlibrary used for faster
serialization/deserialization is not available, so a fallback to the
default JSON implementation is used instead. Because of this, the
tests might actually runslowerwith this plugin under PyPy.
Package: pytest_covid
Pytest covid.When you do testing to that extent, you're going to find more people, you're
going to find more cases. So I said to my people, slow the testing down —
please.The more failures you get, the more tests it will skip.# pytest.ini
[pytest]
[covid]
enabled = True
fake_news = FalseOr if you like Fox News setfake_news = Trueand test failures will be reported as success.test failure contaminationFor each test failure, 4% of the remaining tests will randomly fail (they get
contaminated), and 1% will be skipped. The effect compounds, so a contaminated test,
will contaminate more tests and skip even more. Even withfake_news=True, except
a failing test willappearto be passing.Example:Running 500 test with a 1% change of failing:tests/test_covid.py ...........F.........s...............F.....s..sF...s....FsF..F.sFFs....sFs...s..F [ 16%]
FFsFFFssFsFss.s..sFFsFssssFFssssFs.sFssssss.sFss.sssss.sss.sss.sFsFssssssssFsssFssssss.sssssFssFsssss [ 36%]
ssssssssssssssssssssssssssss.sss.sssss.ss.ssssssFsFssssssFsssssssFsssssssssssssFFsssFssssssssFsFsFsFs [ 56%]
sssssFsssFssssFssssssssssssFssssssssssssFFsssssssssssssssFsssssssssssFssssssssssssssssssssssss.ssssss [ 76%]
ssssssFssssssssssssssssssssssFssssssFsssssssssssFssssssssssssssssFsssssssssssssssssssFssssssssssssFs. [ 97%]
sssssssssssssssSame while watching Fox News, or if you believe you'll safe in church:tests/test_covid.py .....................s....ss..........sssssss.s..s......ss.....s...sss.sss...ss.s [ 16%]
s.s.s..s.ss.s...s..s.s.ss.ss..ssss.s..sssssssssss.ss..sss.sss..s.s.sssssss.s.ss.ss.ssssss.ssss...s..s [ 36%]
ss.ss.ssss.ss...s.sssssss.sssssssssssssssssssssssss.ssss.ssssssssssssssssssssss.ssssssssssssssss.ssss [ 56%]
sssssssssssssssss.ssssssssssssssss.sssssssss.ssssssssssssssssssssssss.s.sssssssssssssssssssssssssss.s [ 76%]
sssssss.ssssssssssssssss.sssss.sssss.sssssssssssssssssssssssssssssssssssssssssss.sssssss.ssssss.sssss [ 97%]
ssssssssssssss
Package: pytest-cpp
Usepytestrunner to discover and execute C++ tests.SupportsGoogle Test,Boost.Test,
andCatch2:This brings several benefits:Allows you to run all your tests in multi-language projects with a single
command;Execute C++ tests inparallelusingpytest-xdistplugin;Use--junitxmloption to produce a single and uniform xml file with all
your test suite results;Filter which tests to run using standard test filtering capabilities, such as
by file names, directories, keywords by using the-koption, etc.;Table of ContentsInstallationUsageConfiguration Optionscpp_filescpp_argumentscpp_ignore_py_filescpp_harnesscpp_harness_collectChangelogSupportInstallationInstall usingpip:$pipinstallpytest-cppUsage$pytestOnce installed, pytest runs will search and run tests
found inexecutablefiles, detecting if the suites are
Google, Boost, or Catch2 tests automatically.Configuration OptionsFollowing are the options that can be put in the pytest configuration file related
to pytest-cpp.cpp_filesYou can configure which files are tested for suites by using thecpp_filesini configuration option:[pytest]cpp_files=test_suite*By default matchestest_*and*_testexecutable files.cpp_argumentsArguments to the C++ tests can be provided with thecpp_argumentsini configuration option.For example:[pytest]cpp_arguments=-v --log-dir=logsYou can change this option directly in the command-line using
pytest’s-ooption:$pytest-ocpp_arguments='-v --log-dir=logs'Important: do not pass filtering arguments (for example--gtest_filter), as this will conflict
with the plugin functionality and behave incorrectly.To filter tests, use the standard pytest filtering facilities (such as-k).cpp_ignore_py_filesThis option defaults toTrueand configures the plugin to ignore*.pyfiles that
would otherwise match thecpp_filesoption.Set it toFalseif you have C++ executable files that end with the*.pyextension.[pytest]cpp_ignore_py_files=Falsecpp_harnessThis option allows the usage of tools that are used by invoking them on the console
wrapping the test binary, like valgrind and memcheck:[pytest]cpp_harness=valgrind --tool=memcheckcpp_harness_collectThis option allows the usage of tools or emulators (like wine or qemu) that are used by invoking them
on the console wrapping the test binary during a test collection.Might be used in the combination withcpp_harnessto run a binary in emulators, like wine or qemu
in cross-compilation targets.[pytest]cpp_harness_collect=qemu-x86_64 -L libs/or[pytest]cpp_harness_collect=qemu-x86_64 -L libs/cpp_harness=qemu-x86_64 -L libs/ChangelogPlease consultCHANGELOG.SupportAll feature requests and bugs are welcome, so please make sure to add
feature requests and bugs to theissuespage!
Package: pytest-cram
pytest-cram: Run cram tests with py.testcramtests command line applications.pytesttests Python applications.
pytest-cram tests Python command line applications
by letting you write your Python API tests with pytest,
and your command line tests in cram.
Best of both worlds!InstallationTo install and use pytest-cram, dopip install pytest-crampytest-cram works on Python 2.7 and 3.3+
and withcramversions 0.7 and up.UsageOnce installed, all.tfiles will be collected
and run with cram, so installation should be all that is needed.If you wish to disable cram tests for an invocation of
pytest, dopy.test --nocramTo override the shell used by cram, dopy.test --shell="C:\git\bash.exe"or set theCRAMSHELLenvironment variableCRAMSHELL=/bin/bash py.testIf you wish to disable specific cram tests,
list them in a.inifile[pytest]
cramignore = file1.t
    pattern*.tRelease History0.2.2 (2020-08-08)FixedUpdated for recent pytest changes. (#13)0.2.1 (2020-05-10)FixedUpdated to use more recent pytest features. (#11,#12)0.2.0 (2018-02-06)FixedFixed tests to work withpytest>=3.3. Pytest added progress indicators
to test output in version 3.3, which the tests were not expecting.0.1.1 (2016-03-07)AddedAdded the--shellcommand line option and now checks theCRAMSHELLenvironment variable to override the default/bin/shshell. (#3)Thanks toFlorian Rathgeberfor the contribution!ChangedDepend explicitly oncram>=0.7. If you would like support for earlier
versions of cram, pleasefile an issue.0.1.0 (2016-02-28)Initial release ofpytest-cram! Supports Python 2.7+ and 3.3+.
Package: pytest-crate
pytest-crateis a plugin forpytestfor writing integration tests that
interact withCrateDB.Usagepytest-crateprovides acratesession fixture which downloads, starts
and stops a CrateDB node.>>>deftest_database_access(crate):...# perform database access......The CrateDB version can be specified using the--crate-versionoption when
runningpytest. By default, the latest stable version of CrateDB is used.Seetests/test_layer.pyfor further examples.
Package: pytest-crayons
pytest-crayonsA pytest plugin for colorful print statements.Installationpip install pytest-crayonsUsageInclude a color fixture in the param list of a test.Then use it instead ofprint.deftest_magenta(magenta):blue("this should be magenta")Just like normal print statements, you only see the output if:There's an failure in the test.or you pass in-sor--capture=noor you wrap the statement in awith capsys.disabled():block.For our examples, we'll use-s:Available colorsredgreenyellowbluemagentacyanExample with all colors:deftest_colors(red,green,yellow,blue,magenta,cyan):print("")# for the newlinered("this should be red")green("this should be green")yellow("this should be yellow")blue("this should be blue")magenta("this should be magenta")cyan("this should be cyan")This was included in a talk for PyCascades 2023Conference talk page :Sharing is Caring - Sharing pytest Fixtures
Package: pytest-create
pytest-createFeaturesTODORequirementsTODOInstallationYou can installpytest-createviapipfromPyPI:$pipinstallpytest-createUsagePlease see theCommand-line Referencefor details.ContributingContributions are very welcome.
To learn more, see theContributor Guide.LicenseDistributed under the terms of theMIT license,pytest-createis free and open source software.IssuesIf you encounter any problems,
pleasefile an issuealong with a detailed description.CreditsThis project was generated from@cjolowicz'sHypermodern Python Cookiecuttertemplate.
Package: pytest-csv
CSV output for pytest.InstallationInstall using pip:pip install pytest-csvUsageTo enable the CSV report:py.test --csv tests.csvTo customize the CSV delimiter/quoting characters:py.test --csv tests.csv --csv-delimiter ';' --csv-quote-char '"'To customize the columns:py.test --csv tests.csv --csv-columns host,function,status,duration,parameters_as_columnsThis is the reference of all available columns:ColumnDescriptionidpytest test identifiermoduletest module nameclasstest classfunctiontest function namenametest name, with argumentsfiletest module filedoctest function docstringstatustest status (passed, failed, error, skipped, xpassed or xfailed)successtest status, as a booleandurationtest duration, in secondsduration_formattedtest duration, human readablemessageerror message, if anymarkerstest markers, as a comma-separated listmarkers_with_argstest markers with their arguments, as a comma-separated listmarkers_as_columnstest markers, each as a separate columnmarkers_args_as_columnstest markers with their arguments, each as a separate columnparameterstest parameters, as a comma-separated listparameters_as_columnstest parameters, each as a separate columnpropertiesproperties recorded usingrecord_property, as a comma-separated listproperties_as_columnsproperties recorded usingrecord_property, each as a separate columnusercurrent user namehostcurrent host (fromplatformmodule)systemcurrent system name (fromplatformmodule)system_releasecurrent system release info (fromplatformmodule)system_versioncurrent system version info (fromplatformmodule)python_implementationcurrent python implementation (fromplatformmodule)python_versioncurrent python version (fromplatformmodule)working_directorycurrent working directoryTo add some data directly from a test function, enableproperties_as_columnsand use:def test_01(record_property):
    record_property('my column 1', 42)
    record_property('my column 2', 'foo bar')To define new column types, inconftest.py(more examples here):def pytest_csv_register_columns(columns):
    columns['my_simple_column'] = lambda item, report: {'my column': report.nodeid}IssuesPlease report issueshere.LicenseThis software is released under the GNU General Public License v3.0, seeCOPYINGfor details.
Package: pytest-curio
curiocode is written in the form of async/await, which makes it slightly more
difficult to test using normal testing tools. pytest-curio provides useful
fixtures and markers to make testing easier.@pytest.mark.curioasyncdeftest_some_curio_code():res=awaitlibrary.do_something()assertb'expected result'==respytest-curio has been strongly influenced bypytest-asyncio.Featuresfixtures for injecting curio kernelpytest markers for treating tests as curio coroutinesInstallationTo install pytest-curio, simply:$pipinstallpytest-curioThis is enough for pytest to pick up pytest-curio.FixtureskernelCreates and injects a new instance of the default curio kernel. The kernel
will be stoped at the end of the test.Note that just using thekernelfixture won’t make your test function a
coroutine. You’ll need to interact with the kernel directly, using methods
likekernel.run. See thepytest.mark.curiomarker for treating test
functions like coroutines.deftest_http_client(kernel):result=[]asyncdefmy_coroutine(obj):result.append(obj)url='http://httpbin.org/get'task=kernel.run(my_coroutine(url))asserturlinresultMarkerspytest.mark.curioMark your test coroutine with this marker and pytest will execute it as an
curio task using the kernel provided by thekernelfixture. See the
introductory section for an example.
Package: pytest-custom-exit-code
Exit pytest test session with custom exit code in different scenariosFeaturesTODORequirementsTODOInstallationYou can install “pytest-custom_exit_code” viapipfromPyPI:$ pip install pytest-custom_exit_codeUsagepytest --suppress-no-test-exit-code

pytest --suppress-tests-failed-exit-codeContributingContributions 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-custom_exit_code” is free and open source softwareIssuesIf you encounter any problems, pleasefile an issuealong with a detailed description.AcknowledegementsThispytestplugin was generated withCookiecutteralong with@hackebrot’scookiecutter-pytest-plugintemplate.
Package: pytest-custom-nodeid
pytest-custom-nodeid: pytest pluginSupport custom grouping.{group name}or{testfile::class}Rename testcases name and testcases nodeid, support allure report.The loadscope load policy based on pytest-xdist is used.Change testcases nodeid and testcases name encoding to UTF-8 and unicode escapeBecause when ‘pytest xdist’ uses’ - x ‘(stops when it fails), if any use case fails, the whole concurrency will stop runningThe skip function is supported. The selected group name will skip all the remaining use cases of the group after the first use case of the group fails to runThis function is particularly useful in scenario testing and other test sets where use cases depend on each other,to avoid failure of previous use cases and unnecessary execution of subsequent use casesFormat:name: idsnodeid:group_name::idsinstallpip installpytest-custom-nodeidUsagecommand line:pytest –rename={on:off} –skip=group_name –skip-json=absolute_pathoptions:–renameIt is used to open the plug-in, rename the marked use cases, code the unmarked use cases only, and close “off” by default–skipIf it fails, the subsequent use case will be skipped. The tag name is needed here.
example: if the tag in IDS is ‘{login}’, the skip tag is ‘–skip=login`–skip-jsonWhen there are too many tags to be marked, it can be stored in a JSON file.
Here you need to enter the absolute address, which can be used with ‘skip’. The two tags will be combinedtip:It supports running with pytest xdist, and can be concurrent with class according to loadscope policyUse{…}as a marker custom grouping.Support “{ filename::classname }” format for multi-level settingsSkipandskip-jsonare case-sensitiveDo not use ‘-x’ in pytest-xdist. If the use case fails, the rest of the use cases will stop running[Chinese](https://github.com/fungaegis/pytest-custom-nodeidDemoimportpytest@pytest.mark.parametrize("group",["world","hello","hello","hello","world","world"],ids=["group_4{group_1}","group_5{group_2}","group_6{file::class}","group_7{group_1}","group_8{group_2}","group_9{file::class}"])deftest_05(group):a="hello"asserta==groupcmd line:pytest –rename=on –skip=group_1 –skip=group_2 –skip=file::class -n=auto –dist=loadscopeSkipmarks the group to which the preceding use case fails, causing subsequent use cases to skipUsing the loadscope load policy, because there are three groups, it will be divided into three groups to run concurrentlynodeid will be renamed togroup_1::group_4group_2::group_5file::class::group_6group_1::group_7group_2::group_8file::class::group_9logv0.2Add label alias, fail skip functionv0.3Add relative address support forskip-json
Package: pytest-custom-report
pytest-custom-reportA plugin for defining your own characters to be used when displaying test outcomes inpytest(passed, failed, skipped etc).For example, if you wanted to see aPILE OF POO (U+1F4A9)glyph displayed in the terminal report for each failing test:pytest--report-failed=💩To persist your custom characters, add a section like this in theconfiguration file(i.e. inpytest.ini,tox.ini,setup.cfgor whatever):[pytest]
report_failed = 💩
report_failed_verbose = OH CRAPInstallation and Usagepipinstallpytest-custom-reportThis will add new command-line arguments and configuration file options topytest(detailed in the following section). Command line arguments take precedence over configuration file settings. The plugin is always enabled, but unless you’ve configured your own symbols thepytestdefaults are used.To execute tests with the plugin disabled temporarily, use this:pytest-pno:pytest-custom-reportIf you’re trying to use emojis but you can’t see the glyphs properly in your terminal, you may be missing unicode fonts with the upper plane - you could install for exampleGNU Unifont.ConfigurationThe table below shows the available options as well aspytest’s default style for each outcome.test outcomecommand-line argument name.ini file config keydefault report symbolpassed--report-passedreport_passed.xpassed--report-xpassedreport_xpassedXfailed--report-failedreport_failedFxfailed--report-xfailedreport_xfailedxskipped--report-skippedreport_skippedserror--report-errorreport_errorEWhen tests are executed with-vor--verboseflag enabled, you’ll see longer strings displayed and one-line per test outcome. These can be specified too.test outcomecommand-line argument name.ini file config keydefault report stringpassed--report-passed-verbosereport_passed_verbosePASSEDxpassed--report-xpassed-verbosereport_xpassed_verboseXPASSfailed--report-failed-verbosereport_failed_verboseFAILEDxfailed--report-xfailed-verbosereport_xfailed_verboseXFAILskipped--report-skipped-verbosereport_skipped_verboseSKIPPEDerror--report-error-verbosereport_error_verboseERRORExample config fileHere is some examplepytest.inicontent that you can copy-paste and modify to your liking:[pytest]

report_passed = ✔
report_xpassed = 🦄
report_failed = ✗
report_xfailed = 👎
report_skipped = ?
report_error = 🔥

report_passed_verbose = OH YEAH
report_xpassed_verbose = WHAT IN TARNATION?
report_failed_verbose = OH CRAP
report_xfailed_verbose = YEAH WHATEVER
report_skipped_verbose = DON'T CARE
report_error_verbose = YOU MEDDLING KIDS!