Saravanan666/pypi-org huggingface dataset:
Package: testgear-importer-junit
Junit report importerJunit reportGetting StartedInstallationpip install testgear-importer-junitUsageAPI clientTo use importer you need to installtestgear-api-client:pip install testgear-api-clientConfigurationUse the commandtestgear-junit --helpto view the configuration setup help:testgear-junit --url <url>
testgear-junit --privatetoken <token>
testgear-junit --projectid <id>
testgear-junit --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/20/testsGET-request project, Preview tab, copy id fieldconfigurationid- id of configuration in TMS instancecreate a projectopen DevTools -> networkgo to the project https://{DOMAIN}/projects/20/testsGET-request configurations, Preview tab, copy id fieldImportingUse the commandtestgear-junit --resultsdir junit-resultsto specify the directory with Junit reports and create new test run in TMS instance.Or use the commandtestgear-junit --resultsdir junit-results --testrunid <id>to specify the directory with Junit reports 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.
Package: testgen
TESTGENTESTGEN is a simple Python package that is intended to be used by short
scripts to generate test cases for competitive programming problems.By using TESTGEN you are not required to store the generated test cases on disk;
TESTGEN promises that the generated tests will be reproducible, meaning that
if you generate them again you will get the exact same test cases.RationalIn competitive programming, you are provided with an algorithmic problem that
you have to solve and then write a piece of code that will solve the problem
for you. Your solution is then executed with a predefined set of test cases,
and if your solution outputs the expected output on each test case in the given
amount of time, your solution is consideredCORRECT.Writing those test cases manually is not really practical, and often you write
a program that generates those tests for you. Instead of writing those scripts
from the ground up for every problem that you need to generate test cases for,
you can think of TESTGEN as a framework that provides you with useful functions
and boilerplate youwilleventually use.In addition, there my be hundreds of different test cases that you will have to
generate to a single problem, and each test case can take up to a couple of
megabytes of storage on the disk. Instead of storing all those test cases,
TESTGEN allows you to write your test generation script in such a way that will
always output the same test cases (even if they use randomness) by using a seed
and a well-formed order of generation. By using TESTGEN you are only required
to store a configuration file namedtestgen.tomlwith your test generation
script, and TESTGEN will generate the tests every time you run the generation
script.UsageTESTGEN is designed to be compatible with theICPC problem package specification.A details example generation script that uses the TESTGEN framework can be
found with the source code of the project,here."""  The following script is an example of a test generation script thatuses the TESTGEN framework for the problem that sums an array of N givenintegers. """from__future__importannotationsfromtestgenimportTestCase,TestCollectionfromdataclassesimportdataclassMAX_ARRAY_SIZE=int(2e5)MAX_ELEMENT=int(1e9)@dataclassclassArraySum(TestCase):input:list[int]defwrite_input(self,input_f)->None:print(len(self.input),file=input_f)print(' '.join(str(i)foriinself.input),file=input_f)defwrite_answer(self,answer_f,input_f)->None:print(sum(self.input),file=answer_f)defvalidate(self)->None:assert1<=len(self.input)<=MAX_ARRAY_SIZEforvinself.input:assert1<=v<=MAX_ELEMENTtests=TestCollection('data/secret',ArraySum)@tests.collect(desc='max sized array filled with ones')defall_ones()->ArraySum:returnArraySum([1]*MAX_ARRAY_SIZE)@tests.collect(desc='array filled with same values',params={'length':range(1,10),'value':(8743,12,999_999)},)defsame_values(length:int,value:int)->ArraySum:returnArraySum([value]*length)@tests.collect(desc='random max sized array',repeat=3)defrandom_list(random)->ArraySum:returnArraySum([random.randint(1,MAX_ELEMENT)for_inrange(MAX_ARRAY_SIZE)])if__name__=='__main__':tests.generate()
Package: test-generator
Generator is a helper for generating test methods for nose while still using unittest.Free software: ISC licenseDocumentation:https://generator.readthedocs.org.Installationpip install test-generatorIntroductionHave you ever written tests that loop through a list of inputs to validate the functionality?Something like?frommythingimportthingyclassMyTestCase(unittest.TestCase):deftest_thingy(self):forinputin['a','b','cccc','ddd''eeeeee','f','g']:self.assertTrue(thingy(input))But running in a loop limits all the functionality inTestCaselike per-
test setUp or tearDown.  It also fails on the first input and you can’t run a
single test input, you have to run them all?  (Doesn’t work well when each
test is more complicated than this toy case).Instead, what if you wrote your test like:fromgeneratorimportgenerator,generatefrommythingimportthingy@generatorclassMyTestCase(unittest.TestCase):@generate('a','b','cccc','ddd','eeeeee','f','g')deftest_thingy(self,input):self.assertTrue(thingy(input))And when you run your tests, you see:----------------------------------------------------------------------Ran7testsin0.001sOKGenerator gives you simple decorators to mulitply your test methods based on
an argument list.  It’s great for checking a range of inputs, a list of error
conditions or expected status codes.ExamplesAPI Client Error HandlingLet’s make sure our API client properly handles error conditions and raises a
generic APIError under the conditions.  We’ll use mock to patch out the actual
API call to return our response.importmockfromgeneratorimportgenerator,generatefromexampleimportclient,APIError@generatorclassTestAPIErrorHandling(unittest.TestCase):@generate(400,401,403,404,500,502,503)deftest_error(self,status_code):withmock.patch(client,'_request')as_request_stub:_request_stub.return_value.status_code=status_codeself.assertRaises(APIError):client.get('/path/')Test FixturesLet’s make sure our API client properly handles error conditions and raises a
generic APIError under the conditions.  We’ll use mock to patch out the actual
API call to return our response.fromgeneratorimportgenerator,generatefromexample.sanitizeimportstrip_tags@generatorclassTestStripTags(unittest.TestCase):@generate(('<h1>hi</h1>','hi'),('<script></script>something','something'),('<div class="important"><p>some text</p></div>','some text'),)deftest_strip_tags(self,input,expected):self.assertEqual(strip_tags(input),expected)History0.1.1 (2015-10-15)First release on PyPI.
Package: testghacookiecutter
Welcome to My C++ ProjectPrerequisitesBuilding My C++ Project requires the following software installed:A C++11-compliant compilerCMake>= 3.9Doxygen (optional, documentation building is skipped if missing)The testing frameworkCatch2for building the test suite* Python>= 3.8for building Python bindingsBuilding My C++ ProjectThe following sequence of commands builds My C++ Project.
It assumes that your current working directory is the top-level directory
of the freshly cloned repository:mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
cmake --build .The build process can be customized with the following CMake variables,
which can be set by adding-D<var>={ON, OFF}to thecmakecall:BUILD_TESTING: Enable building of the test suite (default:ON)BUILD_DOCS: Enable building the documentation (default:ON)BUILD_PYTHON: Enable building the Python bindings (default:ON)If you wish to build and install the project as a Python project without
having access to C++ build artifacts like libraries and executables, you
can do so usingpipfrom the root directory:python -m pip install .Testing My C++ ProjectWhen built according to the above explanation (with-DBUILD_TESTING=ON),
the C++ test suite ofMy C++ Projectcan be run usingctestfrom the build directory:cd build
ctestThe Python test suite can be run by firstpip-installing the Python package
and then runningpytestfrom the top-level directory:python -m pip install .
pytestDocumentationMy C++ Project provides a Sphinx-based documentation, that can
be browsedonline at readthedocs.org.
To build it locally, first ensure the requirements are installed by running this command from the top-level source directory:pip install -r doc/requirements.txtThen build the sphinx documentation from the top-level build directory:cmake --build . --target sphinx-docThe web documentation can then be browsed by openingdoc/sphinx/index.htmlin your browser.
Package: testghapythonpackage
Welcome to My Python ProjectInstallationThe Python packagetestghapythonpackagecan be installed from PyPI:python -m pip install testghapythonpackageDevelopment installationIf you want to contribute to the development oftestghapythonpackage, we recommend
the following editable installation from this repository:git clone git@github.com:dokempf/test-gha-python-package.git
cd test-gha-python-package
python -m pip install --editable .[tests]Having done so, the test suite can be run usingpytest:python -m pytestAcknowledgmentsThis repository was set up using theSSC Cookiecutter for Python Packages.
Package: test-github-ci
Test AutoPub & GitHub Actions CICreate repositoryCreate GitHub and PyPI tokens with appropriate scopesAddGH_TOKEN&PYPI_PASSWORDenvironment variables via repository Settings > Secrets > New secretCreate.github/workflowsand add appropriate GitHub CI workflowAdd appropriate AutoPub configuration topyproject.tomlAddRELEASE.mdfile with release type and descriptiongit add ., commit, and push
Package: testgui
testguiDrop-in replacement GUI for Django testing and testing with unittest.Usage:Django: replace your management commandtestwithtestgui. It works with the same parameters out of the box. eg.python manage.py testguiUnittest: change your test file code like this:from testgui import unittestgui
...
if __name__ == '__main__':
    unittestgui.main()  # instead of unittest.main()Here's a screenshot with TestGUI in operation, after calling python manage.py testgui:Installation:pip install testguiTo use with unittests you are set up.To use django management command, add testgui to INSTALLED_APPS in settings.py:INSTALLED_APPS = [
    ...
    'testgui',
    ...
]Dependencies:[django] [only required if you want to use it as a django management command]pywebviewCompatible with redgreenunittest.License:MIT licenseFeatures:hot module reload* (You don't need to restart testing after you've changed your code.)hot test re-population (If you've changed the name of your test or added new tests, still don't need to restart testing.)normal debugging (You can still use PyCharm or your favorite IDE to debug your code, just as with manage.py test.)run selected test (You just click the icon next to a test or an app and your test runs, don't need to stop debugging.)*note that unfortunately models.py and admin.py files cannot be hot-reloaded by Django's design.
However, TestGUI warns you about this and it does not hot-reload these modules.
Package: test-haha
📦 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: test-helper-gae3
Class for autotests GoogleAppEngine Python3 app.Installpipinstalltest-helper-gae3Usage in testsimportunittestfromgoogle.appengine.extimportndbfromtest_helper_gae3importTestGae3classModelTest(ndb.Model):name=ndb.StringProperty(default='')classTestCase(unittest.TestCase,TestGae3):defsetUp(self):super().setUp()# For using queues names other then 'default', root_path dir must contain file# 'queue.yaml' (or 'queue.yml') with correct queues definition.# If root_path set to None, only 'default' queue is available.TestGae3.set_up(self,'path/to/folder/with/queue.yaml')# activate GAE testbeddeftearDown(self):TestGae3.tear_down(self)# deactivate GAE testbedsuper().tearDown()deftest_record_count(self):self.check_db_tables([(ModelTest,0),# no records in ModelTest])ModelTest().put()self.tester.check_db_tables([(ModelTest,1),# one record in ModelTest])
Package: test-helpers
Test HelpersThe Test Helpers library aims to makeArrange-Act-Assert, class-based tests easier
to write.  The helpers in this module make patching easier, ease Python 3 compatibility,
and gently guide users towards the AAA style of testing.  Additional helpers are included
for situations likely to be encountered in the web-app world.ExamplesThe library is designed to be simple and modular.  By using mixins to extend
the test cases functionality we can write more expressive tests in fewer lines
of code.Creating Patches:>>> from test_helpers import mixins, bases
>>> class WhenFooingBar(mixins.PatchMixin, bases.BaseTest):
...
...     patch_prefix = 'module.submodule'
...
...     @classmethod
...     def configure(cls):
...         cls.foo = cls.create_patch('foo', return_value=True)
...
...     @classmethod
...     def execute(cls):
...         function_under_test()
...
...     def should_have_called_foo(cls):
...         self.foo.assert_called_once_with()Tornado-related ExtensionsThe Test Helpers library includes a number of helpers specific to testing
Tornado-based applications.  Before you can use any of the Tornado helpers,
you must either:install Tornado as a dependencyORinclude a dependency ontest_helpers[tornado]in your pip requirementsDependent Data Service HelpersThe Test Helpers library includes classes that facilitate initializing and
cleaning up dependent data service resources. Provided with connection
configuration to existing service instances, each class can generate name-spaced
workspaces and tear down any created workspaces at the end of each test run.Currently included:MongoDBPostgreSQLRabbitMQSupported Python VersionsThe Test Helpers library is built and tested against python 2.7, 3.3, 3.4, and 3.5.
You may need to grab other versions of the interpreter with your preferred package
manager (MacPorts, Apt, Yum, etc)sudo port install python27 python33Running TestsTo run the all of the tests across the supported versions of Python viatoxrun the following commands in your terminal:$ virtualenv env
$ env/bin/pip install -r dev-requirements.txt
$ env/bin/detoxDeveloping The Test Helpers libraryClone the repo and start hacking:$ virtualenv env
$ env/bin/pip install -r dev-requirements.txtAuthorsDan Tracy,John Brodie,Dave ShawleyatAWeber Communications
Package: testhttp
testhttptesthttp allows you to send HTTP request for testing your endpoints. This is still very incomplete but satisfy my needs at the moment. Feel free to suggest or create changes for updates.FeaturesThe goal is to be compatible withvscode-restclientbut with ability to assert results and automate dependencies.Run named or by index http definitionImport other files to re-use http definitionSet global variables as a context for the scriptsInstallpipinstalltesthttp# -h for helptesthttp-h# Run a filetesthttp--filesample.http# Run all files based on glob patterntesthttp--pattern'/Users/path/to/**/test/*.http'# Declaring a global variable that will be available for all scriptstesthttp--varhost=https://baseurl/# Automatically remove steps with the same nametesthttp--distinctUsageIn editor, type an HTTP request as simple as below:https://example.com/comments/1#### @name postToExamplePOSThttps://example.com/commentsHTTP/1.1content-type:application/json{"name":"sample","time":"Wed, 21 Oct 2015 18:27:50 GMT"}>>>assert{{response.status_code}}==404Save it as sample.http then run the command below:# add --verbose to see request and response information# add --debug for debug infotesthttp--file.sample.http--namepostToExampleImportYou can import other files by:@import other_file.http###... rest of your http infoThis will do a lookup relative to current file. Without specifying --name or --index it will still only run all tests under the current file and will only run things it depends on.Variables & DependenciesRunning by name will result in execution of it's variable dependencies. This way you can only test specific spec and it will still work with single command.@user = hello@password = world@baseUrl = https://example.com# @name loginPOST{{baseUrl}}/api/loginHTTP/1.1content-type:application/json{"username":"{{user}}","password":"{{password}}"}>>>assert{{response.status_code}}==200###@token={{login.response.body.token}}#@namegetCurrentUserGET{{baseUrl}}/api/meHTTP/1.1content-type:application/jsonAuthorization:{{token}}>>>assert{{response.status_code}}==200assert{{response.body.username}}=={{user}}Running only getCurrentUser will automatically run login since it depends on login in the token variable.
Package: testhttpserver
Test HTTP Server================This is a simple HTTP server that will respond to a single HTTP request andrecord some of the data. It is still an early version and doesn't doeverything you probably want.[![Build Status](https://secure.travis-ci.org/philipcristiano/testhttpserver.png?branch=master)](http://travis-ci.org/philipcristiano/testhttpserver)Installing==========pip install testhttpserverUsing in your tests===================To create a test server import the serverfrom testhttpserver import ServerAnd then create a new instance including the port, response status andcontent.server = Server(8000, response_status=200, response_content='Content')After you make your request to http://localhost:8000/ . If you POST to theserver it will have ``request_headers``, ``request_content``, and``request_path``  available.When you are done remember to ``join()``!server.join()See ``tests/test_server.py`` for an example!Server Parameters================port - The port the server will listen onresponse_status - int of the status to returnresponse_content - string of content to returnresponse_headers - a list of tuples to return as headerstimeout - number of seconds before the server timesout and returns
Package: testify
Testify - A Testing FrameworkTestify is a replacement for Python’s unittest module and nose. It is modeled after unittest, and tests written for unittest
will run under testify with a minimum of adjustments, but it has features above and beyond unittest:class-level setup and teardown fixture methods which are run once each for an entire set of test methods.a decorator-based approach for fixture methods, eliminating the need for super() calls.More pythonic, less javaenhanced test discovery - testify can drill down into packages to find test cases (similiar to nose).support for collecting and running tests by collecting modules, classes or methods into test suites.Pretty test runner output (color!)Extensible plugin system for adding additional functionality around reportingComes complete with other handy testing utilities: Mocking (turtle), code coverage integration and profiling.
Package: testime
python-package-exampleThis is a minimal python package, for use alongside the lesson:https://github.com/BillMills/pythonPackageLessonContributing:Please do! Guidelines:This lesson is for beginners. Yes there are plenty of super fancy things we don’t cover here; someday, we’ll make a different, super fancy lesson to teach those things.Max 100 lines or 500 words per PR please.Open an issue or empty PR first to talk about controversial changes.
Package: testincessantly
A tool to run your tests way more often than necessary.Punch Line----------Run this:```bash$ testincessantly dir test-cmd ...```and every time you create/modify/delete a file under `dir`, `test-cmd ...` will get executed.Installation------------Just `pip install testincessantly`.Typical Usage-------------I typically invoke this as```bash$ testincessantly -e '.*' -e '__pycache__' . pytest```The `-e` options exclude dotfiles and anything named `__pycache__`.Okay, that was a lie. I actually typically invoke```bash$ testincessantly -e '.*' -e '__pycache__' . chime-success pytest````chime-success` is [a script](https://gist.github.com/speezepearson/83c234c40d16c9f7fba73d8bca7a1a75) on my `PATH` that makes a noise indicating whether the argument-command passed or failed. Now, every time I save a file, I get a chime telling me whether things are still good or not.
Package: testindata
云测数据数据集管理系统python SDK准备工作从私有化部署产品或者SAAS服务系统中创建好适合您需求的数据集。从系统中获取您用于身份认证使用的「AccessKey」。通过SDK可以对您的数据进行上传和读取的操作，并能使用数据集管理系统提供的数据格式对您的数据做可视化展示。安装pip install testindata

使用本SDK须Python 3.6或更高版本。快速入门上传文件并添加可视化数据fromtestindata.TDAimportTDA#AccessKey 可以从系中对应的位置获取AccessKey="your_AccessKey"#datasetId 从系统对应位置获取datasetId="ds_yourdatasetId"#实例化全局TDA操作对象, 如果您使用的是SAAS服务，无需设置host，如果您使用的是私有化部署产品，则您需要指明您的数据集服务ip地址tda=TDA(AccessKey,host="https://dataset.testin.cn/")#设置要操作的数据集tda.SetDataset(datasetId)上传文件并添加可视化数据云测数据数据集管理系统提供了数据可视化的功能，您可以将数据转换为系统规定的数据格式，并由sdk上传至系统，即可从系统中查看可视化的数据。fromtestindata.TDAimportTDAAccessKey="0fbe149adf07e5f4afa01a7a4e787fde"host="xx.xx.xx.xx"tda=TDA(AccessKey,host=host)#进入debug模式，该模式下sdk会打印出执行信息tda.Debug()dataset=tda.SetDataset("ds_******")metaData={"metaKey1":"metaVal1","metaKey2":"metaVal2","metaKey3":"metaVal3",}#添加一个用于可视化的文件file=tda.AddFile("/path/to/your/fileRootPath/11.jpg",referId="myTestRefId",metaData=metaData)box={"x":10,"y":10,"width":100,"height":100,}label="myTestLabelName"attr={"attrKey1":"attrVal1","attrKey2":"attrVal2","attrKey3":"attrVal3",}#为该文件添加一个标注结果file.AddBox2D(box,label=label,attrs=attr)#上传该文件print(tda.Upload())进入DEBUG模式tda=TDA(AccessKey,debug=True)或者tda.debug()在debug模式下，sdk会输出很多执行过程中的信息，以方便您监控整个程序的执行过程。获取文件列表数据filesData=tda.GetData(offset=1000,limit=1000)forfileinfileData["files"]:print(file.fid)print(file.referId)print(file.meta)print(file.md5)print(file.path)forlabelinfile.labeldata.labels:print(label)offset默认从0开始，limit最大值为1000获取标注结果#根据fid 获取标注结果file=tda.GetFileAndLabel(fid="fs_N7T02AgYJGF6yxAbk75R")#根据ref_id获取标注结果file=tda.GetFileAndLabel(ref_id="myreferId1")print(file.fid)print(file.referId)print(file.meta)print(file.md5)print(file.path)forlabelinfile.labeldata.labels:print(label)fid是数据集系统存储文件的唯一id，该id可以唯一定位一个上传文件；ref\_id是需要您自己维护的一个用于唯一定位资源的id，我们强烈建议您设置资源文件的ref\_id，用于关联您自己的业务系统。更多信息查看sdk官方文档地址