Saravanan666/pypi-org huggingface dataset:
Package: testfilter
testfilterunittest 用例执行过滤， 可选择用例级别或用例级别进行过滤如何使用它?>>>pipinstalltestfilterimportunittestfromtestfilterimportrunIf,Filter# 设置执行环境 执行级别Filter.env='test'# test uat prod/production 不区分大小写Filter.level='p2'# smoke/p1 p2 p3 p4 不区分大小写classDemo(unittest.TestCase,metaclass=Filter.Meta):@runIf.env.NOT_PROD# 非正式环境下执行deftest_001(self):self.assertEqual(1,1)@runIf.env.TEST# 仅在测试环境下执行deftest_002(self):self.assertEqual(1,1)@runIf.env.UAT@runIf.env.TEST@runIf.level_in.P3# 测试环境和 UAT 环境下，且用例优先级在 P3 以上执行deftest_003(self):self.assertEqual(1,1)@runIf.level_in.SMOKEdeftest_004(self):self.assertEqual(1,1)if__name__=='__main__':unittest.main()用例环境Tag英文中文TESTTesting测试UATUser Acceptance Test用户验收测试PRODProduction正式/生产用例级别Level:SMOKE/P0P1P2P3P4用例级别参考P0/SMOKE 冒烟：1、挑一些基本的、带有针对性、关键的用例进行测试，不会很细
2、划分依据：主流程或者必须实现的功能测试
3、该级别的测试用例在每一轮版本测试前执行P1/Level1 基本：1、该类用例设计系统基本功能，1级用例的数量应受到控制
2、划分依据：该用例执行的失败会导致多处重要功能无法运行的，如：表单维护中的增加功能、最平常的业务使用等。可以认为是发生概率较高的而经常这样使用的一些功能用例。
3、该级别的测试用例在每一轮版本测试中都必须执行P2/Level2 重要：1、2级测试用例实际系统的重要功能。2级用例数量较多。
2、划分依据：主要包括一些功能交互相关、个种应用场景、使用频率较高的正常功能测试用例
3、在非回归的系统测试版本中基本上都需要进行验证，以保证系统所有的重要功能都能够正常实现。在测试过程中可以根据版本当前的具体情况进行安排是够进行测试。P3/Level3 一般：1、3级测试用例设计系统的一半功能，3级用例数量也较多。
2、划分依据：使用频率较低于2级用例。例如：数值或数组的便捷情况、特殊字符、字符串超长、与外部件交互消息失败、消息超时、事物完整性测试、可靠性测试等等。
3、在非回归的系统测试版本中不一定都进行验证，而且在系统测试的中后期并不一定需要每个版本都进行测试P4/Level4 生僻：如果没有可以不适用该级别1、该级别用例一半非常少。
2、划分依据：该用例对应较生僻的预置条件和数据设置。虽然某些测试用例发现过较严重的错误，但是那些用例的处罚条件非常特殊，仍然应该被植入4级用例中。如界面规范化的测试也可归入4级用例。在实际使用中使用频率非常低、对用户可有可无的功能。
3、在版本测试中有某些正常原因（包括：环境、人力、时间等）经过测试经理同意可以不进行测试。
Package: testfinder
testfinder - Find tests easierCommand-line tool to find, print all the test cases in a project.Find your test methods, class names faster.Integrate with other search/filtering/autocomplete tools like bash, grep, fzf.Defaults to pytest test invocation syntax.
-- Other invocation syntax like Django coming soon!InstallpipinstalltestfinderUsagecd<project-root>
testfinderwith fzffzfis an interactive Unix filter for command-line that can be used with any list and supports fuzzy searches.InstallfzfRun pytest and find your testpytest$(testfinder|fzf)How does it work?In Python the files containing tests usually have the following naming conventions:tests.pytest_*.py*_test.pytests/__init__.pyIt enumerates all the files above, and discovers all the test cases in those files with a few simple regexes.
Package: test-first-jl-extension
test_first_jl_extensionA JupyterLab extension.RequirementsJupyterLab >= 3.0InstallTo install the extension, execute:pipinstalltest_first_jl_extensionUninstallTo remove the extension, execute:pipuninstalltest_first_jl_extensionContributingDevelopment installNote: You will need NodeJS to build the extension package.Thejlpmcommand is JupyterLab's pinned version ofyarnthat is installed with JupyterLab. You may useyarnornpmin lieu ofjlpmbelow.# Clone the repo to your local environment# Change directory to the test_first_jl_extension directory# Install package in development modepipinstall-e"."# Link your development version of the extension with JupyterLabjupyterlabextensiondevelop.--overwrite# Rebuild extension Typescript source after making changesjlpmbuildYou can watch the source directory and run JupyterLab at the same time in different terminals to watch for changes in the extension's source and automatically rebuild the extension.# Watch the source directory in one terminal, automatically rebuilding when neededjlpmwatch# Run JupyterLab in another terminaljupyterlabWith the watch command running, every saved change will immediately be built locally and available in your running JupyterLab. Refresh JupyterLab to load the change in your browser (you may need to wait several seconds for the extension to be rebuilt).By default, thejlpm buildcommand generates the source maps for this extension to make it easier to debug using the browser dev tools. To also generate source maps for the JupyterLab core extensions, you can run the following command:jupyterlabbuild--minimize=FalseDevelopment uninstallpipuninstalltest_first_jl_extensionIn development mode, you will also need to remove the symlink created byjupyter labextension developcommand. To find its location, you can runjupyter labextension listto figure out where thelabextensionsfolder is located. Then you can remove the symlink namedtest-first-jl-extensionwithin that folder.Testing the extensionFrontend testsThis extension is usingJestfor JavaScript code testing.To execute them, execute:jlpm
jlpmtestIntegration testsThis extension usesPlaywrightfor the integration tests (aka user level tests).
More precisely, the JupyterLab helperGalatais used to handle testing the extension in JupyterLab.More information are provided within theui-testsREADME.Packaging the extensionSeeRELEASE
Package: test-firstock
The Firstock Connect API Python client - v3To communicate with the Firstock Connect API using Python, you can use the official Python client library provided by Firstock.Licensed under the MIT License.Documentationpython client documentationv3 - ChangesError code response structured has been changedRenamedInstalling the clientYou can install the pre release via pippip install --upgrade thefirstockIts recommended to update setuptools to latest if you are facing any issue while installingpip install -U pip setuptoolsSince some of the dependencies uses C extensions it has to compiled before installing the package.API usagefromthefirstockimportthefirstocklogin=thefirstock.firstock_login(userId='',password='',TOTP='',vendorCode='',apiKey='')"""Place an order"""placeOrder=thefirstock.firstock_placeOrder(exchange="",tradingSymbol="",quantity="",price="",product="",transactionType="",priceType="",retention="",triggerPrice="",remarks="")"Fetch single order deatils"SOH=thefirstock.firstock_SingleOrderHistory(orderNumber=placeOrder["data"]["orderNumber"],)"""Order book"""orderBook=thefirstock.firstock_orderBook()"""Cancel order"""cancelOrder=thefirstock.firstock_cancelOrder(orderNumber=placeOrder["data"]["orderNumber"])"""Historical data"""timePriceSeries=thefirstock.firstock_TimePriceSeries(exchange="NSE",token="22",startTime="16/08/2022 09:45:32",endTime="15/02/2023 13:45:32",interval="5")Refer to the Firstock Connect Documentation for the complete list of supported methods.WebSocket usagefromtypingimportAnyfromthefirstock.firstockModulesimportfirstockWebSocketsfromthefirstock.pyClient.websocketimportWsClientfromthefirstock.pyClient.websocket.enumsimportMessageTopic"""Initilizer"""client=firstockWebSockets.webSocketLogin()ws=client.ws@ws.on_connectdefconnected(client,message):"""Establishment of connection for required symbol"""ifmessage.get('s')=='OK':client.subscribe_feed('NSE','26000')# Subscribe to NIFTYclient.subscribe_feed('NSE','26009')# Subscribe to BANKNIFTY@ws.on_message(MessageTopic.SUBSCRIBE_FEED)defmsg_handler(client:WsClient,message:Any):"""Prints the message successfully"""print(message)ws.connect(uid='userId',actid='userId')ws.run_forever()Run unit testspython setup.py testChangelogCheck release notes.
Package: testfixtures
Testfixtures is a collection of helpers and mock objects that are useful when
writing automated tests in Python.The areas of testing this package can help with are listed below:Comparing objects and sequencesBetter feedback when the results aren’t as you expected along with
support for comparison of objects that don’t normally support
comparison and comparison of deeply nested datastructures.Mocking out objects and methodsEasy to use ways of stubbing out objects, classes or individual
methods. Specialised helpers and mock objects are provided, including sub-processes,
dates and times.Testing loggingHelpers for capturing logging and checking what has been logged is what was expected.Testing stream outputHelpers for capturing stream output, such as that from print function calls or even
stuff written directly to file descriptors, and making assertions about it.Testing with files and directoriesSupport for creating and checking both files and directories in sandboxes
including support for other common path libraries.Testing exceptions and warningsEasy to use ways of checking that a certain exception is raised,
or a warning is issued, even down the to the parameters provided.Testing when using djangoHelpers for comparing instances of django models.Testing when using TwistedHelpers for making assertions about logging when using Twisted.
Package: test-flask
📦 setup.py (for humans)This repo exists to providean example setup.pyfile, that can be used
to bootstrap your next Python project. It includes some advanced
patterns and best practices forsetup.py, as well as some
commented–out nice–to–haves.For example, thissetup.pyprovides a$ python setup.py uploadcommand, which creates auniversal wheel(andsdist) and uploads
your package toPyPiusingTwine, without the need for an annoyingsetup.cfgfile. It also creates/uploads a new git tag, automatically.In short,setup.pyfiles can be daunting to approach, when first
starting out — even Guido has been heard saying, "everyone cargo cults
thems". It's true — so, I want this repo to be the best place to
copy–paste from :)Check out the example!Installationcdyour_project# Download the setup.py file:#  download with wgetwgethttps://raw.githubusercontent.com/navdeep-G/setup.py/master/setup.py-Osetup.py#  download with curlcurl-Ohttps://raw.githubusercontent.com/navdeep-G/setup.py/master/setup.pyTo DoTests via$ setup.py test(if it's concise).Pull requests are encouraged!More ResourcesWhat is setup.py?on Stack OverflowOfficial Python Packaging User GuideThe Hitchhiker's Guide to PackagingCookiecutter template for a Python packageLicenseThis is free and unencumbered software released into the public domain.Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any means.
Package: testflocken
testflockenstructuretree.
├──.github
│└──workflows
│└──ci.yml
├──testflocken
│├──__init__.py
│├──__main__.py
│├──app.py
│├──cli.py
│└──py.typed
├──tests
│├──__init__.py
│└──test_app.py
├──.dockerignore
├──.env
├──.envrc
├──.gitignore
├──.pre-commit-config.yaml
├──CHANGELOG.md
├──Makefile
├──README.md
├──flake.lock
├──flake.nix
├──poetry.lock
└──pyproject.toml5directories,20files
Package: testflows
TestFlows.com Open-Source Software Testing FrameworkIntroductionTestFlows.com Open-Source Software Testing Frameworkis afloworiented test framework that can be used for functional,
integration, acceptance and unit testing. It useseverything is a testapproach
with the focus on providing test designers flexibility in writing and running their tests.DocumentationYou can findTestFlows.com Open-Source Software Testing Framework's documentation athttps://testflows.com.Supported environmentUbuntu20.04Python 3>= 3.8InstallationYou can installTestFlows.com Open-Source Software Testing Frameworkusingpip3$pip3installtestflowsor from sources$gitclonehttps://github.com/testflows/TestFlows.git
$cdTestFlows
$./package&&./installStylesTestFlows.com Open-Source Software Testing Frameworksupports defining tests using either the traditional keywordsModule,Suite,Test, andStepor using keywords such asModule,Feature,Scenario,Given,When,Then,But,And,ByandFinallyHello TestFlowsAn inline test scenario can be defined as followsfromtestflows.coreimportScenariowithScenario("Hello TestFlows!"):passthen just run it usingpython3command$python3./test.pyJul12,202014:30:20⟥ScenarioHelloTestFlows!1ms⟥⟤OKHelloTestFlows!,/HelloTestFlows!

Passing

✔[OK]/HelloTestFlows!1scenario(1ok)Totaltime2ms

ExecutedonJul12,202014:30
TestFlows.comOpen-SourceSoftwareTestingFrameworkv1.6.200712.1132037Want to know more?Find more information aboutTestFlows.com Open-Source Software Testing Frameworkathttps://testflows.com.Join our channel onTelegram.
Package: testflows.asyncio
TestFlows - AsyncIOThe connect module is still work in progress and is currently under development.
Please use it only for reference.Module to provide asyncio capabilities.Currently supports only Python 3.8 or above.Installation$./build;./installwhere$./buildcreates a pip installable package in./dist, for example$lsdist/testflows.asyncio-1.2.210504.123636.tar.gzand$./installinstalls thetestflows.asynciomodule.
Package: testflows.connect
TestFlows - ConnectMinimal module to provide capabilities to connect to
and control CLI programs.Currently supports only Python 3.6 or above.Installation$./build;./installwhere$./buildcreates a pip installable package in./dist, for example$lsdist/testflows.connect-1.2.190905.123636.tar.gzand$./installinstalls thetestflows.connectmodule.
Package: testflows.database
TestFlows.com Open-Source Software Testing FrameworkDatabaseThe database module is still work in progress and is currently under development.
Please use it only for reference.Minimal module to provide capabilities to work with a database.Currently supports only Python 3.6 or above.Installation$./build;./installwhere$./buildcreates a pip installable package in./dist, for example$lsdist/testflows.database-1.0.190905.123636.tar.gzand$./installinstalls thetestflows.databasemodule.
Package: testflows.stash
TestFlows.com Open-Source Software Testing FrameworkStashWhyAllows to stash values or files that are generated during test program execution
that could be reused on the next test program run.UsageUsestashedcontext manager to stash a value.
If the value identified by name is found inside the stash
then the code within thewithblock is not executed.ExampleHere is an example how to usetestflows.stashmodule
and thestashedcontext manager to stash a value
returned by a function that takes a non trivial time to execute.example1.pyimporttimefromtestflows.stashimportstasheddefgenerate_value():print("Generating a value that takes a long time...")time.sleep(10)return"my generated value"withstashed("value")asstash:stash(generate_value())print(stash.value)In this example, we simulate the work done by the function usingtime.sleep(10). The stashed value is identified by thenameargument passed when creating an instance of the stash using thestashed()context manager.On the first run, when the value is not in a stash
the code within thewithblock is executed where the value
to be stashed is added by callingstashinstance with the value
to be stashed. In this case, the result of thegenerated_value()function.$python3example1.py
Generatingavaluethattakesalongtime...
mygeneratedvalueNote thatstashfolder will be created in the same directory as the source file.$find
./stash
./stash/example1.py.stash
./example1.pyThestashfolder will contain a file that stores the stashed value by using the name specified
upon creation of the stash instance. The name of the stash file will have the same prefix as the
original source file.The content of the file will have the following$cat./stash/example1.py.stashvalue='"my generated value"'On the second run, the value is found in a stash and the body of thewithblock is skipped and thegenerated_value()is not called
and the stashed value is available using thestash.valuewherestashis the instance of thestashed()context manager.$python3example1.py
mygeneratedvaluestashed()Thestashedcontext manager can take the following arguments.stashed(name,id=None,output=None,path="./stash",encoder=json,use_stash=True)wherenamename of the stashed value inside the stash fileidcustom stash id, default:Noneoutputfunction to output the representation of the value, default:Nonepathcustom stash folder path, default:./stashencodercustom encoder for the value, default:jsonuse_stashuse stash, default:True. IfFalse, then the stash will not be used
and thewithblock is always executed regardless if the value is
already stored in a stashIn general, stash file name format is defined as<source file name>.<id>.stash
Package: testflows.uexpect
TestFlows.com Open-Source Software Testing FrameworkuExpectMinimal module to provide expect-like capabilities to
launch and control CLI programs.Currently supports only Python 3.6 or above.Installation$./build;./installwhere$./buildcreates a pip installable package in./dist, for example$lsdist/testflows.uexpect-1.2.190905.123636.tar.gzand$./install
Package: testfm
TestFMis a test suite based onpytest-ansiblethat exercises The Foreman maintenance toolQuickstartThe following is only a brief setup guide for TestFM.
The section on Running the Tests provides a more comprehensive guide to using
TestFM.TestFM requires SSH access to the server system under test, and this SSH access
is implemented by pytest-ansible.Get the source code and install dependencies:git clone https://github.com/SatelliteQE/testfm.git
pip3 install -r requirements.txtThat’s it! You can now go ahead and start testing The Foreman Maintain.
However, there are a few other things you need to do before continuing:Make sure ssh-key is copied to the test system.Make sure foreman maintain is installed on foreman/satellite server.Running the TestsBefore running any tests, you must add foreman or satellite hostname to thetestfm/inventoryfile (first copy it from`testfm/inventory.sample`).That done, you can run tests using pytestpytest --ansible-host-pattern satellite --ansible-user=root  --ansible-inventory testfm/inventory
tests/It is possible to run a specific subset of tests:pytest --ansible-host-pattern satellite --ansible-user=root --ansible-inventory testfm/inventory
tests/test_case.py

pytest --ansible-host-pattern satellite --ansible-user=root  --ansible-inventory testfm/inventory
tests/test_case.py::test_case_nameWant to contribute?Thank you for considering contributing to TestFM! If you have any
question or concerns, feel free to reach out to the team.RecommendedImport modules in alphabetical order.Every method and function will have a properly formatted docstring.In order to ensure you are able to pass the Travis CI build,
it is recommended that you run the following commands in the base of your
testfm directoryflake8flake8 will ensure that the changes you made are not in violation of PEP8
standards. If the command gives no output, then you have passed. If not, then
address any corrections recommended.If you have something great, please submit a pull request anyway!LicensingTestFM is licensed under GNU General Public License v3.0.
Package: testform-888
NOTE: PyInstaller does not extend PYTHONPATH (sys.path) with this directory
that contains bundled 3rd party libraries.Some users complained that PyInstaller failed because their apps were using
too old versions of some libraries that PyInstaller uses too and that’s why
extending sys.path was dropped.All libraries are tweaked to be importable as:from PyInstaller.lib.LIB_NAME import xyzIn libraries replace imports like:from altgraph import y
from modulegraph import zwith relative prefix:from ..altgraph import y
from ..modulegraph import zaltgraphadd fixed version string to ./altgraph/__init__.py:# For PyInstaller/lib/ define the version here, since there is no
# package-resource.
__version__ = '0.13'modulegraphhttps://bitbucket.org/ronaldoussoren/modulegraph/downloadsTODO Use official modulegraph version when following issue is resolved and pull request mergedhttps://bitbucket.org/ronaldoussoren/modulegraph/issues/28/__main__-module-being-analyzed-for-wheeladd fixed version string to ./modulegraph/__init__.py:# For PyInstaller/lib/ define the version here, since there is no
# package-resource.
__version__ = '0.13'
Package: testfoRnExuDSA
Howdie Programmers,
Neux is the library to help you make your python life easier.Need Help?If you are an experienced programmer You guys know you can use help() function in python
If you are a beginner be sure to keep checking the Github repo for Neux and I may upload YouTube videos explaining how Neux works
The docs will be released after the third major update because all the important things will be added by then.Issues:
Want to talk create an issue on github or send an email to the given email located somewhere in the repo.
Can’t Find Email, Here it is:saadyarkhan11@gmail.comI am on Hangouts, but not Discord.
Thanks for Downloading
Package: testfoundry
testfoundrytestfoundryis a Python test generator. This package provides a set of functions for mathematical operations and string manipulation.InstallationYou can installtestfoundryusing pip:bash
pip install testfoundryUsageHere's a basic example of how to usetestfoundry:python
from testfoundry import test_repo
Multiply two numbers
result = test_repo.multiply(2, 3)
print(result) # Outputs: 6FeaturesMathematical Operations: Provides functions to perform multiplication, division, power, factorial, and Fibonacci calculations.String Manipulation: Provides a function to concatenate two strings and another to generate a greeting message.ContributingWe welcome contributions totestfoundry! If you'd like to contribute, please fork the repository and make changes as you'd like. Pull requests are warmly welcome.Licensetestfoundryis licensed under the MIT license. See theLICENSEfile for details.
Package: testfunc
introductiona simple parametrized test tool for functionexamplefromtestfuncimporttestdeffoo(a=0,b=0):returna+b# test_data is a list of test cases# a test case is the form of (args, result) or (args, kw, result)# if args is a tuple it will be unpacked, if this is not desired, pass `unpack=False` to `test`test_data=[((1,2),3),((1,1),3),((1,),1),((),0),(1,{'b':2},3)]test(foo,test_data)screenshotchecktestfunc.pyfor more examples.
Package: testgear-importer-allure
Test Gear TMS importersAllure reportGetting StartedInstallationpip install testgear-importer-allureUsageAPI clientTo use importer you need to installtestgear-api-client:pip install testgear-api-clientConfigurationUse the commandtestgear --helpto view the configuration setup help:testgear --url <url>
testgear --privatetoken <token>
testgear --projectid <id>
testgear --configurationid <id>And fill parameters with your configuration, where:url- location of the TMS instanceprivatetoken- API secret keygo to the https://{DOMAIN}/user-profile profilecopy the API secret keyprojectid- id of project in TMS instancecreate a projectopen DevTools -> networkgo to the project https://{DOMAIN}/projects/{PROJECT_GLOBAL_ID}/testsGET-request project, Preview tab, copy id fieldconfigurationid- id of configuration in TMS instancecreate a projectopen DevTools -> networkgo to the project https://{DOMAIN}/projects/{PROJECT_GLOBAL_ID}/testsGET-request configurations, Preview tab, copy id fieldImportingUse the commandtestgear --resultsdir allure-resultsto specify the directory with Allure report results and create new test run in TMS instance.Or use the commandtestgear --resultsdir allure-results --testrunid <id>to specify the directory with Allure report results and id of test run in TMS instance.Important:This command initiates the import.ContributingYou can help to develop the project. Any contributions aregreatly appreciated.If you have suggestions for adding or removing projects, feel free toopen an issueto discuss it, or directly create a pull request after you edit theREADME.mdfile with necessary changes.Please make sure you check your spelling and grammar.Create individual PR for each suggestion.Please also read through theCode Of Conductbefore posting your first idea as well.LicenseDistributed under the Apache-2.0 License. SeeLICENSEfor more information.