Saravanan666/pypi-org huggingface dataset:
Package: pytest-performance
A simple plugin to ensure the execution of critical sections of code has not been impacted between releases.FeaturesParameterisation of profiling parametersSupport for all time measurement unitsInstallationYou can install “pytest-performance” viapipfromPyPI:$ pip install pytest-performanceUsageDefaultdefmy_func(*args,**kwargs):return123deftest_my_func(performance):# Check my_func runs within 1 second for 10000 iterations.result=performance(my_func)assertresult==123Set custom time amountdefmy_func(*args,**kwargs):return123deftest_my_func(performance):# Check my_func runs within 10 seconds for 10000 iterations.result=performance(my_func,target=10)assertresult==123Set custom time amount and unit (pint units supported)defmy_func(*args,**kwargs):return123deftest_my_func(performance):# Check my_func runs within 1 nanosecond for 10000 iterations.result=performance(my_func,target=10,unit='ns')assertresult==123Set custom time amount, unit and number of iterationsdefmy_func(*args,**kwargs):return123deftest_my_func(performance):# Check my_func runs within 1 nanosecond for 10 iterations.result=performance(my_func,target=10,unit='ns',iterations=10)assertresult==123Fixture can be disabled by passing ‘–performance-skip’ to pytestContributingContributions 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-performance” is free and open source softwareIssuesIf you encounter any problems, pleasefile an issuealong with a detailed description.
Package: pytest-persistence
# pytest-persistencePytest tool for persistent objects## InstallationIn a Python environment do:python -m pip install pytest-persistence## UsageTo store fixtures to file run tests with–store {file_path}:python -m pytest –store {file_path}To load fixtures from file run tests with–load {file_path}:python -m pytest –load {file_path}BEWAREWhen this plugin is in use cleanup of all the fixtures isnotexecuted. This is necessary to successfully run tests with–load. However it
is important to keep this fact in mind.
Package: pytest-pg
pytest-pgv0.0.15 (2023-05-04)Pin version ofurllib3(see for more details)Addpg_15fixturev0.0.14 (2022-09-19)Disable jit by defaultSet bgwriter_lru_maxpagesv0.0.12 (2022-01-18)Ditch logging because it seems to be uselessv0.0.11 (2022-01-09)Move volume to tmpfsv0.0.10 (2022-01-08)Volumes used to remain after running test consuming disk spacev0.0.9 (2021-12-28)Disable fsync, full_page_writes, synchronous_commit to speedup the testsv0.0.8 (2021-12-26)Add typing marker, mypy. Run tests in CIv0.0.7 (2021-12-25)Fix is_ready based on psycopg2v0.0.6 (2021-12-25)Add all recent major versions of PGv0.0.4 (2021-12-10)Fix is_postgres_ready usagev0.0.3 (2021-12-10)Fix uuid generationv0.0.2 (2021-12-10)Follow pytest guide for pluginsv0.0.1 (2021-12-10)A first version
Package: pytest-picked
pytest-pickedRun the tests related to the unstaged files or the current branch
(according to Git)Let's say you have the following output fromgit status:$ git status

On branch main
Your branch is ahead of 'origin/main' by 1 commit.
  (use "git push" to publish your local commits)

Untracked files:
  (use "git add <file>..." to include in what will be committed)

  api.py
  tests/api/
  tests/test_board.py

nothing added to commit but untracked files present (use "git add" to track)Runningpytest --picked, the plugin will run all tests that come from
this output.$ pytest --picked

============================= test session starts =============================
platform darwin -- Python 3.6.4, pytest-3.6.0, py-1.5.3, pluggy-0.6.0
rootdir: /Users/ana.gomes/personal-workspace/grandma, inifile:
plugins: picked-0.1.0, mock-1.10.0, flask-0.10.0, deadfixtures-2.0.1
collecting 34 items
Changed test files... 1. ['tests/test_board.py']
Changed test folders... 1. ['tests/api/']
collected 34 items

tests/test_board.py .                                                      [ 50%]
tests/api/test_new.py .                                                    [100%]

=========================== 2 passed in 0.07 seconds ===========================All tests will be run from files and folders which are modified but not
yet committed. No more copy and paste!Usagepytest--picked

pytest--picked=first

pytest--picked--mode=branch

pytest--picked--mode=unstaged# defaultpytest--picked--mode=branch--parent-branch=dev# if your parent branch differs from "main"FeaturesUsinggit status, this plugin allows you to:Run only tests from modified test filesRun tests from modified test files first, followed by all unmodified testsInstallationYou can installpytest-pickedviaPyPI:pipinstallpytest-pickedContributingContributions are very welcome. Tests can be run withtox, so we can guarantee that it is working
in different python versions. Also, make sure to add tests and usepre-commitbefore you submit a pull request.LicenseDistributed under the terms of theMITlicense,pytest-pickedis free and open source softwareIssuesIf you encounter any problems, pleasefile an issuealong with a detailed description.
Package: pytest-pikachu
pytest-pikachupytest-pikachuprints ascii art ofSurprised Pikachuwhen all tests pass.Installation$ pip install pytest-pikachuUsagePass the--pikachuoption topytestas a command line flag or configuration
file option to get these stunning effects.$ pytest --pikachu
============================= test session starts ==============================
platform linux -- Python 3.9.6, pytest-6.2.4, py-1.10.0, pluggy-0.13.1
rootdir: /home/.../pytest-pikachu, configfile: tox.ini, testpaths: tests
plugins: pikachu-0.1.0
collected 4 items

tests/test_plugin.py ....                                                [100%]

============================== 4 passed in 0.11s ===============================

⢀⣠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀⠀⠀⠀⣠⣤⣶⣶
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀⠀⠀⢰⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧⣀⣀⣾⣿⣿⣿⣿
⣿⣿⣿⣿⣿⡏⠉⠛⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⣿
⣿⣿⣿⣿⣿⣿⠀⠀⠀⠈⠛⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠿⠛⠉⠁⠀⣿
⣿⣿⣿⣿⣿⣿⣧⡀⠀⠀⠀⠀⠙⠿⠿⠿⠻⠿⠿⠟⠿⠛⠉⠀⠀⠀⠀⠀⣸⣿
⣿⣿⣿⣿⣿⣿⣿⣷⣄⠀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣴⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⠏⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠠⣴⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⡟⠀⠀⢰⣹⡆⠀⠀⠀⠀⠀⠀⣭⣷⠀⠀⠀⠸⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⠃⠀⠀⠈⠉⠀⠀⠤⠄⠀⠀⠀⠉⠁⠀⠀⠀⠀⢿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⢾⣿⣷⠀⠀⠀⠀⡠⠤⢄⠀⠀⠀⠠⣿⣿⣷⠀⢸⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⡀⠉⠀⠀⠀⠀⠀⢄⠀⢀⠀⠀⠀⠀⠉⠉⠁⠀⠀⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣧⠀⠀⠀⠀⠀⠀⠀⠈⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢹⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣿Prior artI wrote thispytestplugin after seeingthis Reddit thread. I used the
answer inthis Stack Overflow questionon how to pass information between
differentpytesthooks.LicenseDistributed under the terms of the MIT license,pytest-pikachuis free and
open source software.
Package: pytest-pings
pytest-pings🦊 The pytest plugin for Firefox Telemetry 📊Development🚧 This project is under active development. Do not use it in production. ⚠️CommunityPlease note thatpytest-pingsis released with aContributor Code of
Conduct. By participating in this project you agree to
abide by its terms.LicenseThis project is distributed under the terms of theMozilla Public License
2.0.
Package: pytest-pinned
pytest-pinnedA simplepytestplugin for writingpinning tests.Pinning tests or snapshot tests orcharacterization testsare meant to describe (characterize) the actual behavior of an existing piece of software, and therefore protect existing behavior against unintended changes via automated testing.This type of testing can come in handy for several reasons:Legacy codebase with poor or non-existing test coverage.As broad integration tests where more specific testing may prove difficult.Scientific computing where implementation of, usually quite complex, scientific models are hard to test for specific behaviours, especially when they are used for research purposes.As extra confidence boosters during refactoring.pytest-pinnedkeeps all expected results from pinning tests in a single, pretty-printedJSONfile resulting in only a single file needing to be added to theVCSrepository and diffs are also contained to this single file. The use ofJSONfor serialization of the expected results however imposes some restrictions on the datatypes that can be used, see theJSON type conversion tablefrom the standard library. In addition, however,pytest-pinned>=0.2.0natively supportsnumpyarrays!Note:pytest-pinnedis not compatible withpytest-xdistor any other plugin that runs test in separate subprocesses.Requirementspytest-pinnedhas no external dependencies except forpytestitself.InstallationYou can installpytest-pinnedviapipfromPyPI:$ pip install pytest-pinnedUsagepytest-pinnedexpose a single pytest fixture (pinned) with a very simple syntax.pinnedwill keep track of what test it is used in, supports usage with the standardassertstatement and allows for multiple asserts in the same test.SyntaxSimple pinning test sample:deftest_simple(pinned):assert(10.0==pinned)pytest-pinnedalso supports approximate comparisons usingpytest.approx. See last assert statement in example below for syntax.pinnedaccepts the same keyword arguments aspytest.approx.More elaborate example:deftest_elaborate(pinned):assert(10.0==pinned)assert([1,2,3]==pinned)assert({'a':1,'b':2}==pinned)assert(5.2983746239134==pinned.approx(rel=0.00001,abs=0.001))Expected resultsIfpytest-pinnedcannot find any expected results for a comparison it will fail the test and ask the user to write new expected results.To rewrite the expected results "from scratch", use:$ pytest --pinned-rewriteTo update the expected results for only some tests, use:$ pytest tests/sample_test.py::specific_test --pinned-updateTo change the path wherepytest-pinnedstores (and loads) the expected results, use:$ pytest --pinned-path path/to/expected/results.jsonLicenseDistributed under the terms of theMITlicense,pytest-pinnedis free and open source softwareIssuesIf you encounter any problems, pleasefile an issuealong with a detailed description.ContributingContributions are very welcome.
Package: pytest-pinpoint
Pytest-PinPointA pytest plugin which runs SBFL algorithms to detect faults.First five algorithms are based on what Spencer Pearson, José Campos, René Just, Gordon Fraser, Rui Abreu, Michael D. Ernst, Deric Pang, Benjamin Keller discribed inEvaluating and improving fault localization.referencePearson, S., Campos, J., Just, R., Fraser, G., Abreu, R., Ernst, M. D., ... & Keller, B. (2017, May). Evaluating and improving fault localization. In2017 IEEE/ACM 39th International Conference on Software Engineering (ICSE)(pp. 609-620). IEEE.required installationpip install git+https://github.com/nedbat/pytest-cov.git@nedbat/contextspip install coverage>=5.1run pytest-pinpointGeneral usage, top three ranked results:python -m pytest --cov=. --cov-context --cov-branch --pinpointShow all ranked results:python -m pytest --cov=. --cov-context --cov-branch --pinpoint --show_allShow bottom three ranked results:python -m pytest --cov=. --cov-context --cov-branch --pinpoint --show_last_three
Package: pytest-pitch
pytest_pitchpytest_pitchruns tests in an order such that coverage increases as fast as possible. Typically 99% of the total coverage is achieved in 10% of the test session time.use as pytest plugin for faster coverage increaseFirst create persistent time-coverage record viapytest-dondepython-mpytest[YOURSESSIONARGS]--donde=/path/to/srcwhere/path/to/srcis the code region to cover.Then pass the record file to the plugin viapython-mpytest[YOURSESSIONARGS]--pitchIf You change your test definitions or test selection[YOUR SESSION ARGS]in step 2 without updating the record:tests which are unknown to step 1 (e.g. newly defined tests, less strict test selection)
will be put to the start of the execution ordertests which are known to step 1 but missing in step 2 (e.g. removed tests, stricter test selection) will just be filtered out. Any selection mechanisms should not conflict with the reordering.use in your scriptSeethis scriptas a demo which was used to create the image shown above.backgroundThe plugin employsAlgorithm 1fromp. 3ofS. Khuller, A. Moss, J. Naor, The budgeted maximum coverage problem, Inf. Process. Lett. 70, 1999.installpython-mpipinstallpytest_pitch
Package: pytest-platform-markers
Markers for pytest to skip tests on specific platformsFeaturesThis plugin adds the following markers to pytest:posix: Skipped except on a POSIX os (Linux/OS X,os.name != 'posix')windows: Skipped except on Windows (os.name != 'nt')linux: Skipped except on Linux (sys.platform.startswith('linux'))osx: Skipped except on OS X (sys.platform != 'darwin')not_osx: Skipped on OS X (sys.platform == 'darwin')not_frozen: Skipped when frozen (getattr(sys, 'frozen', False))frozen: Skipped except when frozen (not getattr(sys, 'frozen', False))ci: Skipped except on CI systems ('CI' not in os.environ)not_ci: Skipped on CI systems ('CI' in os.environ)InstallationYou can install “pytest-platform-markers” viapipfromPyPI:$ pip install pytest-platform-markersContributingContributions are very welcome. Tests can be run withtox, please ensure
the coverage at least stays the same before you submit a pull request.Changesv1.0.0Added support for pytest >= 4.0Added support Python 3.6 and 3.7Dropped support for pytest < 3.6Dropped support for Python 3.3 and 3.4v0.1.0Initial releaseLicenseDistributed under the terms of theMITlicense, “pytest-platform-markers” is free and open source softwareIssuesIf you encounter any problems, pleasefile an issuealong with a detailed description.
Package: pytest_playwright_async
Playwright Async Pytest -- ASYNC Pytest plugin for PlaywrightThere an official playwright plugin for pytest:PyPI/playwright-pytest/intro.
But if you need an async version, here is it!Installationpipinstallpytest-playwright-asyncExampleHereyou can find more examples.# conftest.pyimportasyncioimportpytest_asyncio@pytest_asyncio.fixture(scope='session')defevent_loop():# https://pytest-asyncio.readthedocs.io/en/latest/reference/fixtures.html#fixturespolicy=asyncio.get_event_loop_policy()loop=policy.new_event_loop()yieldlooploop.close()# test_playwright.pyimportpytestfromplaywright.async_apiimportPage@pytest.mark.asyncioasyncdeftest_page_async(page_async:Page):awaitpage_async.goto('https://playwright.dev/')assert(awaitpage_async.title()=='Fast and reliable end-to-end testing for modern web apps | Playwright')
Package: pytest-playwright-enhanced
pytest-playwright-enhancedpytest-playwright-enhancedis a batteries includedpytestplugin for theplaywrightpython bindings that
offers extended functionality with a focus on removing boilerplate code for projects that wish to test modern
web applications and APIs.pytest-playwright-enhancedplans to offer the following:Automatic, browser management and installation if required.Improved, human readable APIs that built on top of playwrights API.Improved artifacting and debuggability.Asynchronoussupport.Customhooksto allow you to plugin and modify behaviour at runtime.Much More[!CAUTION]pytest-playwright-enhancedis in the alpha stage.Quick StartQuickly get running by doing the following:pip install pytest-playwright-enhancedplaywright installFixturesplaywright- At present this returns the syncPlaywrightinstance.Hookspytest_playwright_acquire_binaries- Hook in and customise binary acquisition at runtime.
Package: pytest-playwright-snapshot
Pytest Plugin for Snapshot Testing with PlaywrightThis plugin enables snapshot testing in playwright like snapshotting screenshots of pages, element handles etc.Installation$pipinstallpytest-playwright-snapshotUsageThis plugin provides aassert_snapshotfixture which is used to create snapshots and compare it.Example:deftest_myapp(page,assert_snapshot):page.goto("https://example.com")assert_snapshot(page.screenshot(),"example.png")Ths first time you run pytest, you will get error likeFailed: Snapshot not found, use --update-snapshots to create it.As first you need to create golden snapshots to which this plugin will compare in future.To create snapshots run:$pytest--update-snapshotsThis will create snapshots for your tests, after that you can run the tests are usual and this will compare the snapshots.There isthresholdkwarg only option which can be used to set the threshold for the comparison of the screenshots and by default it is0.1LicenseApache 2.0 LICENSE
Package: pytest-playwright-visual
Pytest Plugin for Visual Testing with PlaywrightBased onpixelmatch-pyimage comparison library.Expandsassert_snapshotfixture frompytest-playwright-snapshotlibraryMain Features:snapshots creation on the first runvisual review of mismatchesfailing on--update-snapshotsto make users manually review imagessnapshot name is optional,test_name[browser][os].pngis auto-generated by defaultupdated folder structure:snapshots/file_name/test_name/test_name[browser][os].pngInstallation$pipinstallpytest-playwright-visualUsageThis plugin provides aassert_snapshotfixture which is used to create snapshots and compare it.Example:deftest_myapp(page,assert_snapshot):page.goto("https://example.com")assert_snapshot(page.screenshot())Then, run pytest:$pytestThe first time you run pytest, snapshots will be created, and you will get the error:Failed: --> New snapshot(s) created. Please review imagesThe next run, the snapshots comparison will take place.To update snapshots, run:$pytest--update-snapshotsAfter updating, tests will fail and you will need to review images.In case of a mismatch,snapshot_tests_failuresfolder will be created withActual_..,Expected_..andDiff_..images generated.Folder Structure ExampleAPIassert_snapshot(page.screenshot(), threshold: float = 0.1, name='test_name[browser][os].png', fail_fast=False)threshold- sets the threshold for the comparison of the screenshots:0to1. Default is0.1name-.pngextensions only. Default istest_name[browser][os].png(recommended)fail_fast- IfTrue, will fail after first different pixel.Falseby defaultLicenseApache 2.0 LICENSE
Package: pytest-plugin-helpers
A plugin to help developing and testing other plugins.Thispytestplugin was generated withCookiecutteralong with@hackebrot’scookiecutter-pytest-plugintemplate.FeaturesTODORequirementsTODOInstallationYou can install “pytest-plugin-helpers” viapipfromPyPI:$ pip install pytest-plugin-helpersUsageTODOContributingContributions 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-plugin-helpers” is free and open source softwareIssuesIf you encounter any problems, pleasefile an issuealong with a detailed description.
Package: pytest-plus
PyTest Plus Plugin :: extends pytest functionalityThis plugin aims to be used to host multiple basic pytest extensions that meet
the following criteria:Downgrade gracefully, meaning that if the plugin is removed, you will still
be able to run pytestPYTEST_REQPASSIf you define environment variablePYTEST_REQPASS=123and at the end of the
testing the number of passed tests is
not exactly 123, pytest will return exit code 1.This feature is aimed for CI usage in order to prevent accidental skipping of
some tests. We do expect users to define this variable within their own CI job
definitions. The number of tests executed is likely to be dependent on the CI
job.We discourage defining this inside places liketox.inibecause when a
developer runs tests, they are likely to endup running a different number of
tests. Also, this feature makes no sense if you try to mention a specific test.Avoiding duplicate test function namesWhile pytest allows users to have the same test function names in different
files, that makes it harder to identify and copy/paste the test name in order
to reproduce the failure locally. That is why this plugin forces its users to
avoid having the same function name anywhere in the tested project.You can disable this check by definingPYTEST_CHECK_TEST_DUPLICATE=0.Avoiding problematic test identifiersThis plugin will raise errors when it encounters test IDs that are either too
long or that contain unsafe characters. While pytest is very flexible in allowing
a wide range of test IDs, using these does make development harder as it prevents
people from doing a copy/paste with failed test and pasting in in their terminal
to reproduce the failed test locally.You can disable regex check by definingPYTEST_CHECK_TEST_ID_REGEX=0.You can disable the length check by definingPYTEST_MAX_TEST_ID_LENGTH=0.Release processReleases are triggered fromGitHub Releasespage.LinksMITfile an issuepytesttoxpipPyPI
Package: pytest-pmisc
DescriptionThis module contains a simple Pytest plugin for the pmisc test module.When using the functions in thetestmodule of thepmiscpackage
(assert_arg_invalid,assert_exception,assert_prop,assert_ro_prop, andcompare_strings),Pytestassertion failure reports stop at
the code line using these functions and do not continue into the pmisc test
module.  This focuses attention on the actual assertion failing, and improves
clarity and concisenessInterpreterThe plugin has been developed and tested with Python 2.7, 3.5, 3.6 and 3.7 under
Linux (Debian, Ubuntu), Apple macOS and Microsoft WindowsInstalling$pipinstallpytest-pmiscDocumentationAvailable atRead the DocsLicenseThe MIT License (MIT)Copyright (c) 2018-2019 Pablo Acosta-SerafiniPermission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the “Software”), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
.. CHANGELOG.rst
.. Copyright (c) 2018-2019 Pablo Acosta-Serafini
.. See LICENSE for detailsChangelog1.0.7 [2019-03-21]: Updated dependencies1.0.6 [2019-03-02]: Updated dependencies to fix functionality1.0.5 [2019-03-02]: Entry point bug fix1.0.4 [2019-03-02]: Critical entry point bug fix1.0.3 [2019-03-01]: Updated package management framework1.0.2 [2019-02-19]: Documentation update1.0.1 [2019-02-19]: Updated to newest dependency versions1.0.0 [2018-02-18]: Initial release