Saravanan666/pypi-org huggingface dataset:
Package: pytest-web3-data
Pytest Web3 DataA pytest plugin to fetch test data from IPFS HTTP gateways during pytest execution.Table of ContentsInstallationUsageLicenseInstallationpip install pytest-web3-dataUsageLet's say we want to store our testing data attest/data/*.Optionally, first addtest/data/to.gitignore.Create example test data:mkdir -p test/data/staging/echo 'hello world!' > ./test/data/staging/hello.txtUpload the data to theInterPlanetary File System (IPFS).One option is to useweb3.storage. InstallNode/NPM, and install thew3 CLI:npm install --location=global @web3-storage/w3The set your upload token fromhttps://web3.storage:w3 token#PasteintokenfromthewebUIUpload the testing data to IPFS:w3 put ./test/data/staging --name pytest-web3-data-example --hidden --no-wrapThis outputs a reference to theContent Identifier (CID), e.g.:# Packed 1 file (0.0MB)
# bafybeigvfmtttajzj5no3jt2xavkdncxy3xapw3rndvoxmao72vhwy4osu
⁂ Stored 1 file
⁂ https://w3s.link/ipfs/bafybeigvfmtttajzj5no3jt2xavkdncxy3xapw3rndvoxmao72vhwy4osuWhen we create a test, e.g.:# content of test_usage.pydeftest_usage(web3_data):assertweb3_data.exists()assert(web3_data/'hello.txt').read_text()=="hello world!\n"We can reference our CID either with a flag:pytest --web3-data-dir=test/data/bafybeigvfmtttajzj5no3jt2xavkdncxy3xapw3rndvoxmao72vhwy4osuor in thepytest.inifile:# content of pytest.ini
[pytest]
web3_data_dir = test/data/bafybeigvfmtttajzj5no3jt2xavkdncxy3xapw3rndvoxmao72vhwy4osuTo add new data, copy the currentweb3_datadirectory into a staging directory, e.g.test/data/staging, add new data, and use this staging directory path for--web3-data-dir. Upload to IPFS before committing to Git.For a robust and performant experience, we recommend running a local IPFS daemon, e.g. withipfs-deskop.Enjoy! 😊Licensepytest-web3-datais distributed under the terms of theMITlicense.
Package: pytest-wetest
Welian API Automation test framework pytest pluginFeaturesJson reportAtomic test suitcustom node iddocstring based metadataNoticebreed server, the backend test visualization server of this plugin is not open source,
please consider build your own or just leavebreed_serveroptions empty.Requirements*nix based systempython >=3.6 python3.7 is required if you want set none-asciioptionsinpytest.inipytest >=3.7InstallationYou can install “pytest-wetest” viapipfromPyPI:$ pip install pytest-wetestUsageFor more details please check ondocumentation siteContributingContributions 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-wetest” is free and open source softwareIssuesIf you encounter any problems, pleasefile an issuealong with a detailed description.
Package: pytest-wholenodeid
pytest-wholenodeidpytest-wholenodeid will print the entire node id for test failures in the
header.It turns this:=============================================== FAILURES ===============================================
______________________________ TriggerRuleMatchTests.test_match_locale _________________________________
Traceback (most recent call last):
  File "/home/willkg/mozilla/fjord/fjord/suggest/providers/trigger/tests/test_models.py", line 24, in test_match_locale
    for tr_locales, feedback_locale, expected in tests:
NameError: global name 'tests' is not definedinto this:=============================================== FAILURES ===============================================
____ fjord/suggest/providers/trigger/tests/test_models.py::TriggerRuleMatchTests::test_match_locale ____
Traceback (most recent call last):
  File "/home/willkg/mozilla/fjord/fjord/suggest/providers/trigger/tests/test_models.py", line 24, in test_match_locale
    for tr_locales, feedback_locale, expected in tests:
NameError: global name 'tests' is not definedWhy?Because then you can copy and paste the node id in the header to more easily
run that specific test.Quick startInstall:$ pip install pytest-wholenodeidIt works by default. If you don’t want wholenodeid, then you can pass--nowholenodeidas an argument to disable it.Project detailsCode:https://github.com/willkg/pytest-wholenodeidDocumentation:You’re reading itIssue tracker:https://github.com/willkg/pytest-wholenodeid/issuesLicense:Simplified BSD License; see LICENSE file
Package: pytest-wiremock
pytest-wiremockA pytest plugin and DSL for easy integration testing with wiremock :rocket:Usage:# Todo: Update.ContributingInstalldocker.Installdocker-compose.Installpoetry.Installtox.Runpre-commit install.Create and branch and make changes.executetox -e py38Hooks will automatically run; NO PR's will be accepted with a decrease in coverage.
Package: pytest-xdist-tracker
pytest-xdist-trackerThis plugin allows us to keep artifact after running test with xdist (parallel)Installationpipinstallpytest-xdist-trackerUsingFor example, we usepytest-xdistfor running tests in parallel and
we have a test that fails from time to time.
That definitely a flaky/coupled test that fails because
before were executed tests that keep after self some unexpected state for our failed testpytest-xdist-trackercan help with that caseIt stores artifact after execution like this onexdist_stats_worker_gw1.txtwheregw1is number of xdist nodeThen we can reproduce tests which were run in particular node where failure happenedpytest--from-xdist-stats=xdist_stats_worker_gw1.txtIt will collect tests as usual but will filter by our testsnote: this plugin works only withpytest-xdist
Package: pytest-xdist-worker-stats
pytest-xdist-worker-statsA pytest plugin to list worker statistics after a xdist run.Installation$pipinstallpytest-xdist-worker-statsUsageAll that is needed is to have xdist installed & enabled, and to run tests in multiple workers.Example outputplatform linux -- Python 3.10.11, pytest-7.3.2, pluggy-1.0.0
plugins: xdist-3.3.1, xdist-worker-stats-0.1.0
12 workers [359 items]
.............................................................................................. [ 25%]
.............................................................................................. [ 52%]
.............................................................................................. [ 78%]
.............................................................................                  [100%]
========================================= Worker statistics ==========================================
worker gw0  :   15 tests      12.25s runtime
worker gw1  :   14 tests      12.00s runtime
worker gw2  :   27 tests      11.66s runtime
worker gw3  :   13 tests      12.08s runtime
worker gw4  :   14 tests      12.59s runtime
worker gw5  :   27 tests      12.13s runtime
worker gw6  :   18 tests      12.22s runtime
worker gw7  :   78 tests      12.04s runtime
worker gw8  :   21 tests      12.01s runtime
worker gw9  :   59 tests      12.36s runtime
worker gw10 :   20 tests      11.79s runtime
worker gw11 :   53 tests      12.09s runtime

Tests   : min       13, max       78, average 29.9
Runtime : min   11.66s, max   12.59s, average 12.10s
======================================== 359 passed in 21.52s ========================================DevelopmentPoetry(dependencies) andpre-commit(coding standards) are required for development.$poetryinstall
$pre-commitinstallThanksMany thanks toDenys Korytkinfor the articleHow to get data from pytest-xdist nodes.Changelog0.1.4 (Aug 8, 2023)Summarize statistics0.1.3 (Aug 8, 2023)Add CI0.1.2 (Jun 19, 2023)Fix several issues0.1.1 (Jun 15, 2023)First Release
Package: pytest-xlsx
pytest-xlsxpytest-xlsx 是一个pytest的插件，它可以将xlsx文件作为pytest可以执行的测试文件和测试用例，
这样软件测试人员就可以通过Excel便捷的实现关键字驱动测试（像Robot Framework那样）文档pytest-xlsx：把excel文件视为测试文件的pytest插件pytest-xlsx：使用hook自定义excel用例的执行方式联系作者如果在使用过程中遇到什么问题，欢迎通过以下方式联系：Github：https://github.com/dongfangtianyu/pytest-xlsx/issues/newWeiXin:  python_sanmu
Package: pytest-xpara
pytest-xparais an extended parametrizing plugin of pytest.Installationpip install pytest-xparaUsagepy.test --xpara test_foo.pyExample# test_foo.pyimportpytest@pytest.mark.xparametrizedeftest_bar(lhs,rhs):assertlhs==-rhs# test_foo.yamltest_bar:args:lhs,rhsdata:-lhs:1rhs:-1-lhs:-1rhs:1dataids:-left_to_right-right_to_left$ py.test -v --xpara test_foo.py
========================== test session starts ===========================
platform darwin -- Python 2.7.12, pytest-3.0.5, py-1.4.32, pluggy-0.4.0
cachedir: ../.cache
rootdir: /Users/tonyseek/Sites/pytest-xpara, inifile: setup.cfg
plugins: xpara-0.0.0, cov-2.4.0
collecting ... collected 2 items

test_foo.py::test_bar[left_to_right] PASSED
test_foo.py::test_bar[right_to_left] PASSED

======================== 2 passed in 0.03 seconds ========================ContributingIf you want to report bugs or request features, please feel free to open issues
or create pull requests onGitHub.
Package: pytest-xprocess
A pytest plugin for managing external processes across test runs.InstallingInstall usingpip:pip install pytest-xprocessUseful LinksDocumentation:https://pytest-xprocess.readthedocs.io/Changelog:https://pytest-xprocess.readthedocs.io/en/latest/changes.htmlPyPI Releases:https://pypi.org/project/pytest-xprocess/Source Code:https://github.com/pytest-dev/pytest-xprocessIssue Tracker:https://github.com/pytest-dev/pytest-xprocess/issues/Pytest IRC channel: ircs://irc.libera.chat:6697/#pytestPytest Discord Channel:https://discord.gg/k7F2ZFvJV3
Package: pytest-xray
Plugin installationTo install this library for use please enter the following command:$ pip install pytest_xrayTo use this pluginTo take advantage of the pytest xray plugin, use markers from pytest to associate a test function with a test key and test execution id:import pytest

@pytest.mark.xray(test_key="PRDS-12345", test_exec_key="PRDS-12121")
def test_my_function():
    assert True == TrueEnable the plugin by passing the extra options to the command line when invoking the pytest runner:$ pytest . --jira-xrayIt is important that the environment variablesXRAY_API_CLIENT_IDandXRAY_API_CLIENT_SECRETare set for pytest_xray to sucessfully post results to the Xray API.Maintenance notesPlease make sure that any new releases of the library use an incremented version number from the last. The following guidance is used to properly version bump this library {major}.{minor}.{patch}.Major versions are increased for any new overall library features or general API breaking changes.Minor versions are increased for any new features added or implementation changes to existing APIs.Patch versions are increased for any bug fixes and non-breaking changes.To automatically bump versions, best to install bump2version, then enter either of the following on the command line:$ bump2version majoror$ bump2version minoror$ bump2version patchThese commands automatically commits and tags a new version. Make sure to push tags to the server with$ git push && git push --tags
Package: pytest-xrayjira
Plugin installationTo install this library for use please enter the following command:$ pip install pytest-xrayjiraTo use this pluginTo take advantage of the pytest xrayjira plugin, use markers from pytest to associate a test function with a test key:import pytest

@pytest.mark.xrayjira(test_key="KEY-12345")
def test_my_function():
    assert True == TrueEnable the plugin by passing the extra options to the command line when invoking the pytest runner:$ pytest . --upload-results-to-jira-xrayIt is important that the environment variablesXRAY_API_CLIENT_IDandXRAY_API_CLIENT_SECRETare set for pytest_xrayjira to sucessfully post results to the Xray API.This will create a new test execution which will include all tests that were run.Maintenance notesPlease make sure that any new releases of the library use an incremented version number from the last. The following guidance is used to properly version bump this library {major}.{minor}.{patch}.Major versions are increased for any new overall library features or general API breaking changes.Minor versions are increased for any new features added or implementation changes to existing APIs.Patch versions are increased for any bug fixes and non-breaking changes.To automatically bump versions, best to install bump2version, then enter either of the following on the command line:$ bump2version majoror$ bump2version minoror$ bump2version patchThese commands automatically commits and tags a new version. Make sure to push tags to the server with$ git push && git push --tags
Package: pytest-xray-server
What is that?This is a pytest plugin for reporting tests results to XrayServer. Xray
comes in two flavoursXray Server and Xray Cloudwhich are significantly different. They have incompatible APIs.This plugin works with XrayServer. If you want to work withXray Cloud, usepytest-typhoon-xrayIf you are interested in improving the plugin, read [API documentation for Xray Server] (https://docs.getxray.app/display/XRAY/REST+API)Plugin installationTo install this library for use please enter the following command:$ pip install pytest_xray_serverHow to use this pluginTo start using the plugin, add it to the listpytest_plugins in conftest.py.pytest_plugins = ["pytest_xray_server"]And configure URL to your xray instance in pytest.ini:[pytest]
xray_base_url = https://xray.example.com/rest/In test cases use markers to associate a test function with a test key and test execution id:import pytest

@pytest.mark.xray(test_key="PRDS-12345")
def test_my_function():
    assert True == TrueEnable the plugin by passing the extra options to the command line when invoking the pytest runner:$ pytest . --jira-xray --jira-xray-test-exec-key=PRDS-12121where PRDS-12121 is Jira ticket ID of Test Execution ticket.It is important that the environment variablesXRAY_API_CLIENT_IDandXRAY_API_CLIENT_SECRETare set for pytest_xray_server to successfully post results to the Xray API.export XRAY_API_CLIENT_ID=user.name
export XRAY_API_CLIENT_SECRET=passwordAdding execution evidence.Xray allows attachiching execution evidence in form of text (Results) and binary
blobs (evidence). This plug-in lets you create both of the from tests using xray_result and xray_evidence fixturesdef test_my_function(xray_evidence, xray_result):
    xray_evidence(filename="screenshot.png", data=open('screenshot.png').read())
    xray_result(name='text results', log='chunk of text', status='PASS')The fixtures work by appending evidence and resutls to node.user_properties, you
could add evidence to it from pytest hooks. It is important to add a tuple of
two elements with first element 'xray_result' or 'xray_evidence' and appropriate
type of the second element.from pytest_xray_server import models

item.user_properties.append(("xray_result", models.XrayResult(name='text results', log='chunk of text', outcome='passed')))Maintenance notesPlease make sure that any new releases of the library use an incremented version number from the last. The following guidance is used to properly version bump this library {major}.{minor}.{patch}.Major versions are increased for any new overall library features or general API breaking changes.Minor versions are increased for any new features added or implementation changes to existing APIs.Patch versions are increased for any bug fixes and non-breaking changes.To automatically bump versions, best to install bump2version, then enter either of the following on the command line:$ bump2version majoror$ bump2version minoror$ bump2version patchThese commands automatically commits and tags a new version. Make sure to push tags to the server with$ git push && git push --tags
Package: pytest-xvfb
A pytest plugin to runXvfb(orXephyr/Xvnc) for tests.InstallationYou can install “pytest-xvfb” viapipfromPyPI:$ pip install pytest-xvfbUsageWith Xvfb and the plugin installed, your testsuite automatically runs withXvfb. This allows tests to be run without windows popping up during GUI tests or on systems without a display (like a CI).The plugin sees Xvfb being installed as “optional”, since the tests can still
run without it installed. If it’s unavailable, it will show an informational
message, if on Linux and aDISPLAYis available. When using--xvfb-backendxvfb, this message will turn into a hard error instead.If you’re currently usingxvfb-runin something like a GitHub Actions YAML
file simply remove the wrapper and install this plugin instead - then you’ll
also have the benefits of Xvfb locally.FeaturesYou can pass--no-xvfbto explicitly turn off Xvfb (e.g. to visually
inspect a failure).With--xvfb-backendxephyror--xvfb-backendxvnc, you can use Xephyr
or Xvnc in place of Xvfb, e.g. to visually inspect failures.NOTE:Support forxvncis currently experimental and not tested on CI,
due to incompatibilities with PyVirtualDisplay and Ubuntu 22.04’s tightvncserver.You can mark tests with@pytest.mark.no_xvfbto skip them when they’re
running with Xvfb.Axvfbfixture is available with the following attributes:width: The configured width of the screen.height: The configured height of the screen.colordepth: The configured colordepth of the screen.args: The arguments to be passed to Xvfb.display: The display number (as int) which is used.backend: EitherNone(Xvfb),"xvfb","xephyr", or"xvnc".In a pytest.ini,xvfb_width,xvfb_height,xvfb_colordepthandxvfb_argscan be used to configure the respective values. In addition,xvfb_xauthcan be set totrueto generate anXauthoritytoken.ContributingContributions 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-xvfb” is free and open source softwareThanksThispytestplugin was generated withCookiecutteralong with@hackebrot’sCookiecutter-pytest-plugintemplate.Thanks to@cgoldbergforxvfbwrapperwhich was the inspiration for this
project.IssuesIf you encounter any problems, pleasefile an issuealong with a detailed description.
Package: pytest-xvirt
A pytest plugin to virtualize test. For example to transparently running them on a remote box.Thispytestplugin was generated withCookiecutteralong with@hackebrot’scookiecutter-pytest-plugintemplate.FeaturesTODORequirementsTODOInstallationYou can install “pytest-xvirt” viapipfromPyPI:$ pip install pytest-xvirtUsageTODOContributingContributions 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-xvirt” is free and open source softwareIssuesIf you encounter any problems, pleasefile an issuealong with a detailed description.
Package: pytest-yaml
# pytest_yamlThis plugin is used to load yaml output to your test using pytest framework.## How to install```bashpip install pytest_yaml```## How to use#### Example code```yamlparam: "value"``````pythondef test_hello(yaml_content):assert yaml_content['param'] == 'value', 'your message'```#### Command line```bashpytest ./tests/sample/ --yaml-file ./yaml/sample.yml```
Package: pytest-yaml-sanmu
pytest-ymlpytest plugin for generating test cases by yamlInstallpip install pytest-yaml-sanmuConfig[pytest]run_yaml_case=1Usage(venv) D:\git\github\dongfangtianyu\pytest-yaml-sanmu>pytest
======================================= test session starts =======================================
platform win32 -- Python 3.10.5, pytest-7.2.1, pluggy-1.0.0
rootdir: D:u\git\github\dongfangtianyu\pytest-yaml-sanm, configfile: pytest.ini
plugins: allure-pytest-2.13.0, result-log-1.0.1, yaml-0.2.1.dev
collected 27 items

tests\e2e\test_allure.yaml .                                                                  [  3%]
tests\e2e\test_marks_by_user.yaml .                                                           [  7%]
tests\e2e\test_marks_have_no_parameters.yaml sX                                               [ 14%]
tests\e2e\test_marks_have_parameters.yaml ss.X.                                               [ 33%]
tests\e2e\test_marks_parametrize.yaml ...............                                         [ 88%]
tests\e2e\test_marks_usefixtures.yaml .x                                                      [ 92%]
tests\e2e\test_simple.yaml .                                                                  [ 100%]
============================21 passed, 3 skipped, 1 xfailed, 2 xpassed in 0.20s ====================
Package: pytest-yamltree
Create or check file/directory trees described by YAMLThisPytestplugin was generated withCookiecutteralong with@hackebrot’sCookiecutter-pytest-plugintemplate.FeaturesMonkey-patchespy.path.localclass (the one behindtmpdirfixture) to appendyaml_createandyaml_checkmethods for easy access.Use it like this:def test_foo(tmpdir):
    tmpdir.yaml_create("""
        directory_one:
            file1: Hello World
            file2: "Including\nLine\nBreaks\n"
            subdir:
                file3: |
                    Some raw content here.
                    It is probably better readable.
        directory_two:
            arrow.gif: !!binary |
                R0lGODlhDAAMAIQAAP//9/X17unp5WZmZgAAAOfn515eXvPz7Y6OjuDg4J+fn5
                OTk6enp56enmlpaWNjY6Ojo4SEhP/++f/++f/++f/++f/++f/++f/++f/++f/+
                +f/++f/++f/++f/++f/++SH+Dk1hZGUgd2l0aCBHSU1QACwAAAAADAAMAAAFLC
                AgjoEwnuNAFOhpEMTRiggcz4BNJHrv/zCFcLiwMWYNG84BwwEeECcgggoBADs=
    """)

    # now these files are created under tmpdir
    assert tmpdir.join('directory_one', 'file1').read() == 'Hello World'

    # also can check that directory structure corresponds to the declaration
    tmpdir.yaml_check("""
        directory_one:
            file1: Content
        directory_two: {}  # empty mapping means empty directory
    """)RequirementsPyYAMLInstallationYou can install “pytest-yamltree” viapipfromPyPI:$ pip install pytest-yamltreeUsageTODOContributingContributions 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-yamltree” is free and open source softwareIssuesIf you encounter any problems, pleasefile an issuealong with a detailed description.
Package: pytest-yapf
Run yapfThisPytestplugin was generated withCookiecutteralong with@hackebrot’sCookiecutter-pytest-plugintemplate.FeaturesTODORequirementsTODOInstallationYou can install “pytest-yapf” viapipfromPyPI:$ pip install pytest-yapfUsageTODOContributingContributions 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-yapf” is free and open source softwareIssuesIf you encounter any problems, pleasefile an issuealong with a detailed description.
Package: pytest-yield
testspackageWhat?pytest_yieldis a plugin that allows run tests as coroutines. This
means that a few tests can being executing at same time.Why?This is first question that engineers asking. General theory said us
that each test have to be run separetelly and independently, meaning
without any influence on other tests. This plugin breaks this rules at
all.So why do we need it?Imagine we have integration tests where each test execution takes very
long time. For examle test should wait for some reactions depend on
initial actions. This waiting could take up to e.g. 1 hour. And even
after it we need perform next action from scenario and wait more.
Syncronous execution of all tests, one by one, will take huge amout of
time. But what if all test cases are independent, so actions oftest1does not influence results oftest2. Than make sense some how skip
waiting prosess oftest1and switch execution context totest2. This
actually whatpytest_yielddoing.How?Each concurrent test is suppose to be a generator. Switching of
execution context is performed after eachyield. Test add itself to
the end of a deueue if generator is not exausted yet. After new one is
pulled from left side of dequeue. Assume test haveNyields, tahn it
will beNtimes rescheduled.Do not use withTests that are cross dependent. Most
particular example is unittests with mocks, iftest1mock some method,
this will be implicitly mocked intest2also.