Saravanan666/pypi-org huggingface dataset:
Package: testing.redis
testing.redisautomatically setups a redis instance in a temporary directory, and destroys it after testingInstallUse easy_install (or pip):$ easy_install testing.redisAndtesting.redisrequires Redis server.UsageCreate Redis instance usingtesting.redis.RedisServer:import redis
import testing.redis

# Launch new Redis server
with testing.redis.RedisServer() as redis_server:
    r = redis.Redis(**redis_server.dsn())
    #
    # do any tests using Redis...
    #

# Redis server is terminated heretesting.redisautomatically searchs for redis-server from$PATH.
If you install redis to other directory, setredis_serverkeyword:redis = testing.redis.RedisServer(redis_server='/path/to/your/redis-server')testing.redis.RedisServerexecutesredis-serveron instantiation.
On deleting RedisServer object, it terminates Redis instance and removes temporary directory.If you want a database including any fixtures for your apps,
usecopy_data_fromkeyword:# uses a copy of specified data directory of Redis.
redis = testing.redis.RedisServer(copy_data_from='/path/to/your/database')You can specify parameters for Redis withredis_confkeyword:# Enable appendonly mode
redis = testing.redis.RedisServer(redis_conf={'appendonly': 'yes'})For example, you can setup new Redis server for each testcases on setUp() method:import unittest
import testing.redis

class MyTestCase(unittest.TestCase):
    def setUp(self):
        self.redis = testing.redis.RedisServer()

    def tearDown(self):
        self.redis.stop()RequirementsPython 2.6, 2.7, 3.2, 3.3, 3.4, 3.5redisLicenseApache License 2.0History1.1.1 (2016-08-20)Fix a bug#1 Fix parameter handling1.1.0 (2016-02-03)Add timeout to server invokerAdd testing.redis.RedisServerFactoryDepend ontesting.common.databasepackage1.0.3 (2015-04-06)Fix bugs:Do not call os.getpid() on destructor (if not needed)Use absolute path for which command1.0.2 (2014-06-19)Add timeout on terminating redis-serverFix bugs1.0.1 (2014-06-11)Fix ImportError if caught SIGINT on py31.0.0 (2013-12-07)First release
Package: testingtool-canvsUser
Canvs Toolbox PackageDate Formatting"MM/DD/YY"Generalfrom canvs_toolbox import general as gengen.consolidate_data(file_path, file_type='csv')API ToolsCanvs TVfrom canvs_toolbox.api import tv as tvAPItvAPI.twitter_daily_export(api_key, data_mode, start_date, end_date)tvAPI.twitter_emotional_authors(api_key, series_id, start_date, end_date)tvAPI.airings_backfill(api_key, data_mode, start_date, end_date)tvAPI.facebook_backfill(api_key, data_mode, start_date, end_date)Canvs Watchfrom canvs_toolbox.api import watch as watchAPIwatchAPI.post_backfill(api_key, data_mode, start_date, end_date)watchAPI.series_backfill(api_key, data_mode, start_date, end_date)Canvs Socialfrom canvs_toolbox.api import social as socialAPIsocialAPI.get_facebook_posts(api_key, fb_id, org_id, start_date, end_date, query_increment=None)socialAPI.get_page_collection(api_key, org_id, start_date, end_date, fb_pages, query_increment=None)Analytics ToolsCanvs TVfrom canvs_toolbox.analytics import tv as tvAnalyticsAudience Overlap Analysisimplementation: tvAnalytics.audience_overlap_analysis(directory)input directory should contain audience csv files from calling tvAPI.twitter_emotional_authors()analysis will find the overlapping audiences across those csv filesfor best results, rename the csv files to desired series names (e.g. showA, showB)Audience Erosion Analysisimplementation: tvAnalytics.audience_erosion_analysis(filename)input file should be a single audience csv file from calling tvAPI.twitter_emotional_authors()creates an episode-over-episode drop-off analysisEmotional Fingerprinting Analysisimplementation: emotional_fingerprinting_analysis(source, filename, format)input file should be either from a direct Explore Programs export from the Canvs App
or from any of the API exports except twitter_emotional_authorscomputes an emotional similarity score for all possible combinations of passed-in contentcan choose to either return a stacked view of all pairings and their scores (format = 'stacked)
or a matrix view containing similarity scores at content intersections (format = 'matrix')
Package: testing-tool-theg
Testing Tool THEGThis is a simple package to test your THEG codeREPO.Usage:
- Check value : your_instance(exp, got)
- Get Results : your_instance(0,0,True)Example:fromtesting_tool_thegimport*your_instance=checker()your_instance(1,1)your_instance(1,1)your_instance(1,1)your_instance(1,2)# Made a mistakeyour_instance(1,1)your_instance(0,0,True)# Give you an overview of your resultsOutput:Usage:
	- Check value : your_instance(exp, got)
	- Get Results : your_instance(0,0,True)
Test     : 01

Expected : 1
got      : 1


Test     : 02

Expected : 1
got      : 1

Test     : 03

Expected : 1
got      : 1


Test     : 04

Expected : 1
got      : 2


Test     : 05

Expected : 1
got      : 1




test 01: [PASS]
test 02: [PASS]
test 03: [PASS]
test 04: [FAIL]
test 05: [PASS]

Some tests have failed
Out[5]:
[FAIL]
Package: testing-upload
Edit a file, create a new file, and clone from Bitbucket in under 2 minutesWhen you're done, you can delete the content in this README and update the file with details for others getting started with your repository.We recommend that you open this README in another tab as you perform the tasks below. You canwatch our videofor a full demo of all the steps in this tutorial. Open the video in a new tab to avoid leaving Bitbucket.Edit a fileYou’ll start by editing this README file to learn how to edit a file in Bitbucket.ClickSourceon the left side.Click the README.md link from the list of files.Click theEditbutton.Delete the following text:Delete this line to make a change to the README from Bitbucket.After making your change, clickCommitand thenCommitagain in the dialog. The commit page will open and you’ll see the change you just made.Go back to theSourcepage.Create a fileNext, you’ll add a new file to this repository.Click theNew filebutton at the top of theSourcepage.Give the file a filename ofcontributors.txt.Enter your name in the empty file space.ClickCommitand thenCommitagain in the dialog.Go back to theSourcepage.Before you move on, go ahead and explore the repository. You've already seen theSourcepage, but check out theCommits,Branches, andSettingspages.Clone a repositoryUse these steps to clone from SourceTree, our client for using the repository command-line free. Cloning allows you to work on your files locally. If you don't yet have SourceTree,download and install first. If you prefer to clone from the command line, seeClone a repository.You’ll see the clone button under theSourceheading. Click that button.Now clickCheck out in SourceTree. You may need to create a SourceTree account or log in.When you see theClone Newdialog in SourceTree, update the destination path and name if you’d like to and then clickClone.Open the directory you just created to see your repository’s files.Now that you're more familiar with your Bitbucket repository, go ahead and add a new file locally. You canpush your change back to Bitbucket with SourceTree, or you canadd, commit,andpush from the command line.
Package: testing-v1beta3-googledatastore
Google Cloud Datastore Protocol Buffer client.Google Cloud Datastore is a fully managed, schemaless, non-relational
datastore accessible through Google APIs infrastructure. It provides
a rich set of query capabilities, supports atomic transactions, and
automatically scales up and down in response to load.Usage>>>importgoogledatastoreasdatastore>>>datastore.set_options(project_id='project-id')>>>req=datastore.BeginTransactionRequest()>>>datastore.begin_transaction(req)<google.datastore.v1beta3.datastore-pb2.BeginTransactionResponse ...>Installation$pipinstallgoogledatastoreDocumentationhttps://developers.google.com/datastoreContributehttps://github.com/GoogleCloudPlatform/google-cloud-datastore
Package: testinstances
testinstances is a set of managed instance wrappers to make integration testing with redis and mongodb easier. If you
have the binaries on your path, it can handle creating and destroying sandboxed instances for you to test with.ExamplesThe API is straightforward and easily embedeed in setup/teardown functions. It also automatically returns a connection
to the instance.:importunittestfromtestinstancesimportRedisInstanceclassTestSomeJunk(unittest.TestCase):defsetUp(self):# Set up an instance on port 12345self.redis=RedisInstance(12345)deftearDown(self):self.redis.terminate()deftest_stuff(self):self.redis.conn.set('foo','bar')self.assertEqual(self.redis.conn.get('foo'),'bar')Or, if you wanted to be fancy and avoid the process creation/termination cost for every test case:importunittestfromtestinstancesimportMongoInstanceclassTestSomeJunk(unittest.TestCase):@classmethoddefsetUpClass(cls):# Set up an instance on port 12345cls.mongo=MongoInstance(12345)@classmethoddeftearDownClass(cls):cls.mongo.terminate()defsetUp(self):# All instance types implement ``flush``self.mongo.flush()deftest_stuff(self):collection=self.mongo.conn['someDB']['someCollection']collection.insert({'foo':'bar'})self.assertEqual(collection.find({'foo':'bar'}).next()['foo'],'bar')DevelopingTo run the tests you need to install all of the databases the tests run:For Debian/Ubuntu:$sudoapt-getinstallredis-servermongodb-serverFor OSX:$sudobrewinstallredismongodbThen you just runtox.RoadmapNew Instance KindsKafkaZookeeperDocumentation and ReadTheDocsTravis-CI
Package: testipynb
Unit-testing for a collection of jupyter notebooks.testipynbrelies onnbconvertto run the notebooks and catches errors so that they are output (with syntax highlighting!) when unit-tests are run.why?If you want to share your notebooks and be confident that they _should_ work on someone else’s machineIf you are using notebooks to generate figures in a publication and want to ensure they are reproducible (powerful when connected withcron jobs on travis-ci)installationpip install testipynbusageimporttestipynbNBDIR='../notebooks'Test=testipynb.TestNotebooks(directory=NBDIR)Test.assertTrue(Test.run_tests())or in a unit-test file:importtestipynbimportunittestNBDIR='../notebooks'Test=testipynb.TestNotebooks(directory=NBDIR,timeout=2100)TestNotebooks=Test.get_tests()if__name__=="__main__":unittest.main()connectionstestipynbis used in:https://github.com/simpeg-research/heagy_2018_AEMIf you usetestipynbin one of your repositories and would like it listed, pleaseedit this file
Package: testit-allure-adaptor
Allure report adaptor for Test ITInstallationClone this project and open the console in the project directory:$pipinstalltestit-allure-adaptorUsage$testit--resultsdirallure-results$testit--helpChanges in update 0.1.9Fixed the sequence of steps before and afterThe namespace value has been removed from the section, only the classname value is usedChanges in update 0.1.8Fixed mapping for results’ fields fromnewman-reporter-allure
Package: testit-allure-adaptor-test
Allure report adaptor for Test ITInstallationClone this project and open the console in the project directory:$pipinstalltestit-allure-adaptorUsage$testit--resultsdirallure-results$testit--helpChanges in update 0.1.9Fixed the sequence of steps before and afterThe namespace value has been removed from the section, only the classname value is usedChanges in update 0.1.8Fixed mapping for results’ fields fromnewman-reporter-allure
Package: testit-importer-allure
Test IT TMS importersAllure reportGetting StartedInstallationpip install testit-importer-allureUsageConfigurationUse the commandtestit --helpto view the configuration setup help:testit --url <url>
testit --privatetoken <token>
testit --projectid <id>
testit --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 commandtestit --resultsdir allure-results --testrunname <name>to specify the directory with Allure report results and create new test run with the specified name in TMS instance.The--testrunnameparameter is optional. The default name of testrun is"AllureRun"Or use the commandtestit --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.
Package: testit-importer-junit
Junit report importerJunit reportGetting StartedInstallationpip install testit-importer-junitUsageAPI clientTo use importer you need to installtestit-api-client:pip install testit-api-clientConfigurationUse the commandtestit-junit --helpto view the configuration setup help:testit-junit --url <url>
testit-junit --privatetoken <token>
testit-junit --projectid <id>
testit-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 commandtestit-junit --resultsdir junit-resultsto specify the directory with Junit reports and create new test run in TMS instance.Or use the commandtestit-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: testix
TESTIXTestix is a Mocking framework for Python, meant to be used withpytest.Testix is special because it allows you to specify what your mock objects do,
and it then enforces your specifications automatically. It also reduces (albeit
not entirely) mock setup. Other frameworks usually have a flow like this:setup mocklet code do something with mockassert mock used in correct wayTestix flow is a bit differentsetup mock objects (sockin the following example)specify exactly what should happen to them using a Scenario contextTOCDocumentationSmall ExampleInstallationPython 3 and Legacy PythonAdvanced FeaturesDocumentationRead the full docs atreadthedocsSmall ExampleHere's a small example:# create your object under test, pass in some mock objects# in production, Chatbot will receive and actual socket object# here we want to test what it does with the socket it receives# and we do not want it to actually communicate with anyone# to both those ends, we pass a mock, or fake, object.self.tested=chatbot.Chatbot(Fake('sock'))# Fake('sock') is a mock object named "sock"# create a Scenario context# inside, you specify exactly what the unit should do with the objects its handedwithScenario()ass:# we can refer here to s.sock, because there is a mock named `sock`s.sock.recv(4096)>>'request text'# unit must call sock.recv(4096).# this call will return 'request text's.sock.send('response text')# call your unit's codeself.tested.go()# Scenario context ends, and verifies everything happened exactly as specified# No more, no lessNote that you do not have to setupsock.recvorsock.send- oncesockis
set up, it will generate other mock objects automatically as you go along with
it. Only "top level" mock objects need to be setup explicitly.Continue reading for further examples.InstallationWithpip:$ pip install testixPython 3 and Legacy Python (Python 2)Testix works with Python 3. It will not work with legacy python.Credit Where it's dueTestix started as a re-implementation of ideas from theVoodoo-Mockunit-testing framework. Since then it has evolved some different traits though.LicenseThis software is available under the MIT License, see theLICENSEfile.
Package: test-jack-py
An example Python module.InstallationYou can install example using pip:pip install exampleasciidoc
CopyUsageTo use example, you can import it in your Python code:import exampleresult = example.add(1, 2)
print(result) # Output: 3asciidoc
CopyContributingIf you想要贡献代码或报告 bug，欢迎在 GitHub 上提交 issue 或 pull request。License
Package: test-JaqalPaq-extras
JaqalPaq-ExtrasJaqalPaq-Extras contains extensions to theJaqalPaqpython package, which itself is
used to parse, manipulate, emulate, and generate quantum assembly code written
inJaqal(Just another quantum assembly
language).  The purpose of JaqalPaq-Extras is to facilitate the conversion of
programs written in other quantum assembly languages into Jaqal circuit objects
in JaqalPaq.  JaqalPaq-Extras is supported on a "best effort" basis, and
quality cannot be guaranteed.Because some other quantum assembly languages do not support explicit
scheduling like Jaqal does, JaqalPaq-Extras also contains some basic quantum
circuit scheduling routines.  Furthermore, to facilitate execution on theQSCOUT(Quantum Scientific Computing Open User
Testbed) platform, JaqalPaq-Extras also includes extensions for third-party
quantum software toolchains that support the QSCOUT hardware model (including
its native gate set and scheduling constraints).  In summary, JaqalPaq-Extras
contains the following functionalities:Conversion of quantum assembly data structures into JaqalPaq circuit objects
from:IBM'sQiskitRigetti'spyquilGoogle'sCirqETH Zurich'sProjectQCQC'spytketBasic routines for scheduling unscheduled quantum assembly programs.Extensions to these packages above, as needed, to support to the QSCOUT
hardware model.InstallationJaqalPaq-Extras is available onGitLab.  It requires JaqalPaq to be
installed first, which is also  available onGitLab.  JaqalPaq-Extras requires JaqalPaq
itself be installed first.
Both JaqalPaq and its extensions can be installed withpip:pipinstalljaqalpaq
pipinstalljaqalpaq-extrasIf only the scheduler will be used, there are no other dependencies.
However, to make use of the transpiler subpackages, one or more other software
toolchains
must be installed. As of this writing, all five supported toolchains can be
installed via
pip as follows, with the supported versions of these packages indicated:pipinstallqiskit>=0.27.0,<0.28.0
pipinstallpyquil>=2.21.0,<3.0.0
pipinstallcirq>=0.11.0,<0.12.0
pipinstallprojectq>=0.5.1,<0.7.0
pipinstallpytket>=0.5.6,<0.13.0Additionally, a gate-set specification is required for all of the transpiler
subpackages.
Currently, we provide the QSCOUT native gate models, which is also available onGitLaband can be installed viapip:pipinstallqscout-gatemodelsDocumentationOnline documentation is hosted onRead the
Docs.LicenseApache 2.0Questions?For help and support, please contactqscout@sandia.gov.
Package: test-jfq-project
My ProjectDocumentation:https://jfquinones.github.io/my_projectSource Code:https://github.com/jfquinones/my_projectPyPI:https://pypi.org/project/my_project/Short DescriptionInstallationpipinstallmy_projectDevelopmentClone this repositoryRequirements:PoetryPython 3.7+Create a virtual environment and install the dependenciespoetryinstallActivate the virtual environmentpoetryshellTestingpytestDocumentationThe documentation is automatically generated from the content of thedocs directoryand from the docstrings
of the public signatures of the source code. The documentation is updated and published as aGithub project pageautomatically as part each release.ReleasingTrigger theDraft release workflow(pressRun workflow). This will update the changelog & version and create a GitHub release which is inDraftstate.Find the draft release from theGitHub releasesand publish it. When
a release is published, it'll triggerreleaseworkflow which creates PyPI
release and deploys updated documentation.Pre-commitPre-commit hooks run all the auto-formatters (e.g.black,isort), linters (e.g.mypy,flake8), and other quality
checks to make sure the changeset is in good shape before a commit/push happens.You can install the hooks with (runs for each commit):pre-commitinstallOr if you want them to run only for each push:pre-commitinstall-tpre-pushOr if you want e.g. want to run all checks manually for all files:pre-commitrun--all-filesThis project was generated using thewolt-python-package-cookiecuttertemplate.
Package: test-junkie
Test JunkieInstallationFrom your favorite terminal:pip install test-junkieorpython -m pip install test-junkieBasic UsageSave code bellow into a Python file. Lets sayC:\Development\TestJunkie\demo.py.fromtest_junkie.decoratorsimportSuite,beforeTest,afterTest,test,beforeClass,afterClass@Suite()classExampleTestSuite:@beforeClass()defbefore_class(self):print("Hi, I'm before class")@beforeTest()defbefore_test(self):print("Hi, I'm before test")@afterTest()defafter_test(self):print("Hi, I'm after test")@afterClass()defafter_class(self):print("Hi, I'm after class")@test()defsomething_to_test1(self):print("Hi, I'm test #1")@test()defsomething_to_test2(self):print("Hi, I'm test #2")@test()defsomething_to_test3(self):print("Hi, I'm test #3")# and to run this marvel programmatically, all you need to do . . .if"__main__"==__name__:fromtest_junkie.runnerimportRunnerrunner=Runner([ExampleTestSuite])runner.run()# OR use Test Junkie's CLI: `tj run -s C:\Development\TestJunkie\demo.py`CLIStarting from version0.6a6there is now fullCLIsupport and the above test suite can also be executed withtj run -s C:\Development\TestJunkie\demo.pyFor more examples, seeCLI documentation.Output ExampleFull documentation is available ontest-junkie.comPleasereportany bugs you find.Our Sponsorsbecome oursponsor