Saravanan666/pypi-org huggingface dataset:
Package: testrhcs
IntroductionRH Ceph QE Focus Groups mainly contribute test coverage features in the cephci repository. Test automation requires methods that could execute a specific workflow, verify the result and post this information to the user. At present, a QE engineer creates methods inside their own workspace. The implemented method has a high probability that it is required by another team. For example: a method to restart a specific Ceph Daemon.These methods are generally development keeping the FGs objectives in mind. This makes it less attractive if another team wants to reuse them. This causes an explosion in the methods being create in the repository.Getting StartedRHCS QE SDK for Python can be installed from Source, Pypi installation methods.From Source$gitclonehttps://gitlab.cee.redhat.com/rhcs-qe/rhcs-qe-sdk.git
$cdrhcs-qe-sdk$pythonsetup.pyinstall--user# to install in the user directory (~/.local)$sudopythonsetup.pyinstall# to install globallyOr using PIP:$gitclonehttps://gitlab.cee.redhat.com/rhcs-qe/rhcs-qe-sdk.git
$cdrhcs-qe-sdk$pipinstall.From Pypi$gitclonehttps://gitlab.cee.redhat.com/rhcs-qe/rhcs-qe-sdk.git
$cdrhcs-qe-sdk$pipinstallRhcsQeSdkInstall rhcs-qe-sdk's dependencies$pipinstall-rrequirements.txt
Package: testrig
testrigPython package integration testing.Runs the test suite of some package against ‘old’ and ‘new’ versions
of given dependencies. Failures that appear in ‘new’ are reported.Each test suite run is run in a virtualenv constructed from scratch.
You should installccache(and possibly alsof90cache) to
avoid drinking too much coffee.Alternatively, binary conda packages can be used — however, binary
incompatibities may arise in this configuration.Currently, this is POSIX-only, and tested only on Linux.UsageRun:python -mtestrig --help
python -mtestrig examples/testrig.ini pandas       # run tests
python -mtestrig examples/testrig-conda.ini pandas # use conda packages
python -mtestrig examples/testrig.ini -j           # run all packages parallelThe runs may take a long time, as it builds everything from source.ConfigurationConfiguration is read from an.inifile.  It contains sections, one per
test environment.  Section namedDEFAULTcan be used to specify
(overridable) default values for the configuration items.An example first (runs scipy test suite against old and new numpy
versions):[DEFAULT]
pkgs = nose tempita Cython==0.22 scipy==0.17.0
old = numpy==1.7.2 {pkgs}
new = Cython==0.22 git+https://github.com/numpy/numpy@master {pkgs}

[scipy]
pkgs = {pkgs} scipy
run = python -mpytest --junit-xml=junit.xml --pyarg scipy
parser = junit:junit.xml
envvars =
    SETUPCFG=$DIR/mysetup.cfgMore examples can be found under theexamples/folder.The configuration items in each section are:env: which environment to usevirtualenv: virtualenv + pip, all packages are built from sourcesconda: conda, uses binary packages, except forgit+urls
and package names prefixed bypip+.
Note that you may need to write stuff likenumpygit+https://github.com/numpy/numpy.gitsince conda only
understand that packages installed by it are present.old: package specifications for the ‘old’ configuration (see below).new: package specifications for the ‘new’ configuration (see below).run: command that runs the tests.parser: parser for the test output. Available options:junit:FILENAME: parses xUnit/jUnit xml result output, stored in given
filename. Both nose and py.test can produce this output:py.test--junit-xml=junit.xml...andnosetests--with-xunit--xunit-file=junit.xml....nose: parses nose stdoutenvvars: additional environment variables to set (also for pip install).
The text$DIRis replaced by an absolute path of the directory where the
configuration file resides.The values support string interpolation, and default values can be
specified in theDEFAULTsection. For example:[DEFAULT]
pre = foo
post = quux

[section]
post = {post} quux2
new = {pre} bar {post}produces the valuenew = foo bar quux quux2.The package specifications are a string containing a list of pip (or
conda if using env=conda) packages version specifications, with the
following additional possible items:--no-binary: do not install following packages via wheels or conda.--binary: install following packages via wheels or conda, if possible.By default, binary packages are used.
Package: test-robot-keeper
import setuptoolswith open("README.md", "r") as fh:
long_description = fh.read()setuptools.setup(
name="example_pkg",
version="0.0.1",
author="Example Author",
author_email="author@example.com",
description="A small example package",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/pypa/sampleproject",
packages=setuptools.find_packages(),
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
],
)
Package: testr_recipe
testr recipe============This allows you to easily add a testrepository script to your buildoutproject. This really only means that the user doesn't have to havetestr on their path, and they can just use ./bin/test or simlar.This works very similarly to zc.recipe.testrunner, and in fact borrowsmost of its code from there.A sample buildout configuration would be::[buildout]develop = .parts = test[test]recipe = testr_recipescript = testwhich will have ./bin/test run using the .testr.conf in your rootdir.These are the options you can use:* script: define the name of the script to create, if not passedthen the name of the section will be used.* working-directory: if somewhere other than the root of the projectshould be used.* environment: the name of a section containing pairs of values toput in the environment for the test run, e.g.::[test]recipe = testr_recipeenironment = testenv[testenv]foo = barzap = zang* initialization: a string containing python code to put in the testscript before testr is run.* executable: the python executable to put in the #! of the script.* defaults: a list of options to prepend sys.argv for testr.These are specified as Python source for an expression yielding a list,typically a list literal. One thing you can do with this is::[buildout]parts = test testr[testr]recipe = testr_recipe[test]recipe = testr_recipedefaults = ["run"]which will make ./bin/test run the tests, and allow you to use./bin/testr to access all the features of testr.Creating the .testr.conf automatically--------------------------------------Given that buildout knows most things about your project you canhave it create the .testr.conf for you.[testr]recipe = testr_recipetest-packages = mypackageinterpreter = pythonFuture enhancments:* Maybe automatically doing "testr init" when setting up the project, so that./bin/test works straight away.
Package: testrun
testrunA Python library for tests with meaningful output and display (IDLE-compatible)Version: 1.0.0Author: ES AlexanderRelease Date: 07/Nov/2019This testing module is intended for small-scale testing of python, including
in IDLE. Notable features include:TestRun:
A base class for a test-suite, including automatic test-detection
(for methods beginning withtest_), running all available tests or a
specified set withrun_tests, running the tests which failed in the last
run withrun_failed_tests, and automatic (not in IDLE) and user-generated
timeouts while testing.TestGroup:
A class for grouping multiple TestRun instances as though they are a single
instance.Redirect:
A class for stream redirection and multiplication, focused on stdin, stdout,
and stderr, but also usable for general file streams. Allows for capturing
printed output and simulating typed input while testing.MultiRedirect:
A class for managing multiple redirections, allowing for methods to be run
simultaneously on all stored redirections.UsageInstall via pip, usingpython3 -m pip install --upgrade testrun.To import the entire module, useimport testrun.TestRun as TestRun.Otherwise, to import one or more classes, usefrom testrun.TestRun import  TestRun, Redirect.
Package: test-runner
test-runner—A Runner for Python TestsRunning Python tests is a complicated task, as it seems that there is not
standard way of doing it.test-runnerimplements some heuristics that try to run tests with or without
coverage measuring, independent of the used testing framework.PrerequisitesBefore you begin, ensure you have met the following requirements:You have installed Python at least in version 3.6.You have a recent Linux machine.
The library is most likely to not work on another operating system since it is
depending onbenchexecfor resource
handling, which currently only runs on recent versions of Linux.For development it is necessary to have thepoetrypackaging and dependency management system.Installing Test RunnerTest Runner can be easily installed fromPyPIusing thepiputility:pipinstalltest-runnerContributing to Test RunnerTo contribute to Test Runner, follow these steps:Fork this repository.Setup a virtual environment for development usingpoetry:poetry install.Create a branch:git checkout -b <branch_name>.Make your changes and commit themgit commit -m '<commit_message>'.Push to the original branch:git push origin <project_name>/<location>.Create the pull request.Please note that we require you to meet the following criteria:Write unit tests for your code.Run linting withflake8andpylintRun type checking usingmypyFormat your code according to theblackcode styleTo ease the execution of the tools, we provide aMakefilewith various targets.
The easiest way to execute all checks is to runmake checkon apoetry shell.
Push your commits only if they pass all checks!
These tools are also executed in continuous integration on TravisCI and will also
check you pull request.
Failing a check will block your pull request from being merged!ContributorsSee theContributors pagefor a list of contributors.
Thanks to all contributors!Licensetest-runneris free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.test-runneris distributed in the hope that it will be useful
but WITHOUT ANY WARRANT; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Lesser General Public License for more details.You should have received acopyof the
GNU Lesser General Public License
along withtest-runner.  If not, seehttps://www.gnu.org/licenses/.
Package: test-saspersic
Real Python Feed ReaderThe Real Python Feed Reader is a basicweb feedreader that can download the latest Real Python tutorials from theReal Python feed.For more information see the tutorialHow to Publish an Open-Source Python Package to PyPIon Real Python.InstallationYou can install the Real Python Feed Reader fromPyPI:python -m pip install realpython-readerThe reader is supported on Python 3.7 and above. Older versions of Python, including Python 2.7, are supported by version 1.0.0 of the reader.How to useThe Real Python Feed Reader is a command line application, namedrealpython. To see a list of thelatest Real Python tutorials, call the program without any arguments:$ realpython
The latest tutorials from Real Python (https://realpython.com/)
 0 How to Publish an Open-Source Python Package to PyPI
 1 Python "while" Loops (Indefinite Iteration)
 2 Writing Comments in Python (Guide)
 3 Setting Up Python for Machine Learning on Windows
 4 Python Community Interview With Michael Kennedy
 5 Practical Text Classification With Python and Keras
 6 Getting Started With Testing in Python
 7 Python, Boto3, and AWS S3: Demystified
 8 Python's range() Function (Guide)
 9 Python Community Interview With Mike Grouchy
10 How to Round Numbers in Python
11 Building and Documenting Python REST APIs With Flask and Connexion – Part 2
12 Splitting, Concatenating, and Joining Strings in Python
13 Image Segmentation Using Color Spaces in OpenCV + Python
14 Python Community Interview With Mahdi Yusuf
15 Absolute vs Relative Imports in Python
16 Top 10 Must-Watch PyCon Talks
17 Logging in Python
18 The Best Python Books
19 Conditional Statements in PythonTo read one particular tutorial, call the program with the numerical ID of the tutorial as a parameter:$ realpython 0
# How to Publish an Open-Source Python Package to PyPI

Python is famous for coming with batteries included. Sophisticated
capabilities are available in the standard library. You can find modules for
working with sockets, parsing CSV, JSON, and XML files, and working with
files and file paths.

However great the packages included with Python are, there are many
fantastic projects available outside the standard library. These are most
often hosted at the Python Packaging Index (PyPI), historically known as the
Cheese Shop. At PyPI, you can find everything from Hello World to advanced
deep learning libraries.

[... The full text of the article ...]You can also call the Real Python Feed Reader in your own Python code, by importing from thereaderpackage:>>> from reader import feed
>>> feed.get_titles()
['How to Publish an Open-Source Python Package to PyPI', ...]
Package: test-scraper-pypi
test_scraper_pypiTesting scraper package as pip packageFree software: MIT licenseDocumentation:https://test-scraper-pypi.readthedocs.io.FeaturesTODOCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.0 (2022-05-28)First release on PyPI.
Package: testscript-eval
testscript-eval-pyTestsTo run tests locally specifyTESTS_AIDBOX_LICENSEin the.envfile
You can get license from thehttps://aidbox.app/ui/portal/Run Aidboxdocker compose up -d.Install project dependencies:pipenv install --devRunecho PYTHONPATH=. >> .envto run tests properlyRun tests ```
pipenv run pytest
Package: test-sdk-jaylen
Your SDK PackageYour SDK Package 是一个用于与你的 API 服务交互的 Python SDK。安装可以通过 pip 来安装 Your SDK Package：pip install test_sdk_jaylen使用方法from your_sdk_package import app, DatabaseConnector使用示例创建数据库连接db_connector = DatabaseConnector(host="your_host", user="your_user", password="your_password", database="your_database")
db_connector.connect()调用 API 示例检查相似性response = app.post('/check_similarity', json={'name': ['New Title'], 'country': 'Country', 'source_name': 'Source Name'})打印响应print(response.json())配置
你需要配置以下参数才能使用 SDK：host: 数据库主机地址
user: 数据库用户名
password: 数据库密码
database: 数据库名称
依赖项
Your SDK Package 依赖以下 Python 包：Flask
mysql-connector-python
nltk
贡献
欢迎贡献代码！你可以通过提交 Pull Request 来改进这个 SDK。版权和许可
这个项目使用 MIT 许可证。详细信息请参阅 LICENSE 文件。
Package: test-server
Documentation for test_server packageSimple HTTP Server for testing HTTP clients.InstallationRunpip install -U test_serverUsage ExamplefromunittestimportTestCaseimportunittestfromurllib.requestimporturlopenfromtest_serverimportTestServer,Response,HttpHeaderStorageclassUrllibTestCase(TestCase):@classmethoddefsetUpClass(cls):cls.server=TestServer()cls.server.start()@classmethoddeftearDownClass(cls):cls.server.stop()defsetUp(self):self.server.reset()deftest_get(self):self.server.add_response(Response(data=b"hello",headers={"foo":"bar"},))self.server.add_response(Response(data=b"zzz"))url=self.server.get_url()info=urlopen(url)self.assertEqual(b"hello",info.read())self.assertEqual("bar",info.headers["foo"])info=urlopen(url)self.assertEqual(b"zzz",info.read())self.assertTrue("bar"notininfo.headers)unittest.main()
Package: test-sf-etl-py3
SURFIN 封装一些通用的方法, 要求python3测试版本pypi地址https://pypi.org/project/test-sf-etl-py3/依赖发送图片(必须)：需安装wkhtmltopdf,下载地址如下(windows需加入环境变量)https://wkhtmltopdf.org/downloads.html使用案例示例：钉钉机器人发送消息# pip install test_sf_etl_py3fromsf_etl_py3.botimportDingBot# ------ 发送文本 ------ding_obj=DingBot()ding_obj.set_kwargs(url='*机器人的url',sec='机器人的加签')ding_obj.send_text('需要发送的消息')# ------ 发送图片(pg数据库查询到的数据, 以图片形式发送) ------ding_obj=DingBot()ding_obj.set_kwargs(url='*机器人的url',sec='机器人的加签',access_key_id='*阿里云的oss账号',access_key_secret='*阿里云的oss账号',endpoint='阿里云的oss地区, 默认 http://oss-ap-southeast-1.aliyuncs.com',bucket_name='阿里云的ossbucket_name, 默认 surfin-bigdata')# 参数1: pg数据库配置# 需要2: 需要执行的sqlding_obj.send_img_simple({'host':'xxx','port':8756,'user':'xxx','password':'xxx','database':'xxx'},"select 1 as test;")版本0.0.9Test version: kettle xml
Package: test-skeleton
# test-skeleton[![Build Status](https://travis-ci.org/jerry-git/test-skeleton.svg?branch=master)](https://travis-ci.org/jerry-git/test-skeleton)[![Pypi](https://img.shields.io/pypi/v/test-skeleton.svg)](https://pypi.python.org/pypi/test-skeleton)[![Py vers](https://img.shields.io/pypi/pyversions/test-skeleton.svg)](https://pypi.python.org/pypi/test-skeleton)A tool for creating a skeleton for Python unit tests based on source code.Basically, this is a tool for non-TDD development. Use TDD if possible.A potential use case for this tool could e.g. a legacy project which lacks tests.## Usage```bashpython -m test_skeleton path/to/your/source_file.py```The result will be printed to std out. If you want to store it into a file, use `--save` flag. The result will be stored into test_<original_filename> in your current working directory.## ExampleInput:```pythonclass Klass(object):klass_var = ''def __init__(self):self.a = ''@propertydef property1(self):pass@classmethoddef klassmethod1(cls):passdef method_with_under_scores(self):passdef helper_function1():pass```Output:```pythonclass TestKlass:class TestProperty1:def test_TODO(self):passclass TestKlassmethod1:def test_TODO(self):passclass TestMethodWithUnderScores:def test_TODO(self):passclass TestHelperFunction1:def test_TODO(self):pass```
Package: test_song
A sample Python projectA sample project that exists as an aid to the Python Packaging User Guide’s Tutorial on Packaging and Distributing Projects.This projects does not aim to cover best practices for Python project development as a whole. For example, it does not provide guidance or tool recommendations for version control, documentation, or testing.This is the README file for the project.The file should use UTF-8 encoding and be written using reStructuredText. It will be used to generate the project webpage on PyPI and will be displayed as the project homepage on common code-hosting services, and should be written for that purpose.Typical contents for this file would include an overview of the project, basic usage examples, etc. Generally, including the project changelog in here is not a good idea, although a simple “What’s New” section for the most recent version may be appropriate.
Package: teststack
Test an application with infrastructure.teststack.toml[tests.steps]ping="ping -c4 8.8.8.8"env="env"raw="{posargs}"[services.database]image="postgres:12"[services.database.ports]"5432/tcp"=""[services.database.environment]POSTGRES_USER="bebop"POSTGRES_PASSWORD="secret"POSTGRES_DB="bebop"[services.database.export]SQLALCHEMY_DATABASE_URI="postgresql://{POSTGRES_USER}:{POSTGRES_PASSWORD}@{HOST}:{PORT;5432/tcp}/{POSTGRES_DB}"POSTGRES_MAIN_USER="{POSTGRES_USER}"POSTGRES_MAIN_PASSWORD="{POSTGRES_PASSWORD}"POSTGRES_MAIN_HOST="{HOST}"POSTGRES_MAIN_RDS_HOST="{HOST}"POSTGRES_MAIN_PORT="{PORT;5432/tcp}"POSTGRES_MAIN_DBNAME="{POSTGRES_DB}"There are two main sections:testsandservices.Thetestsection is for information about the docker container that is going
to be used for testing. It renders theDockerfile.j2, and injects environment
variables for customization. Thetests.stepssection specifies which steps
should be run on a test machine. Any unprocessed commandline arguments that are
passed into teststack are stuck into commands asposargs.teststackrenderteststackbuildteststackrun-sraw--pytest-kmytestteststackstopTheservicessection specifies the services that need to be started along side
a test container.  In this example, a postgres container is started.  Then the
ports specify which ports need to be exposed, so 5432/tcp. And what environment
variables should be passed to the service docker container when starting up, so
that it can be configured. In this case, we set the username, password and db
for the database. The three commands around the services are start, stop and
restart, they do what they say.teststackstartteststackstopteststackrestartEverything that is set in the environment section is available when exporting.
The other special variables that are made available is the HOST of the docker
container. By default, theenvcommand exportslocalhostfor the{HOST}variable. And then the port that is exported has the number appended after a
semicolon. So if you have specified5432/tcpas a port for a service
container, the variable{PORT;5432/tcp}will be made available for exporting,
or to add to connection strings.If however, the env is being used to start a test container (like run does) the
HOST variable will be the default docker network IPAddress of the container, and
the port will be just the port, and not adapted to the forwarding port on the
Host network.If you choose to run tests locally, instead of in the tests container, you can
export the environment variables for the stack and source them or put them in a
file for something like vscode to read.$source<(teststackenv)$teststackenv--no-export>.env
Package: test-stages
Run Tox tests in groups, stopping on errorsThetest-stageslibrary provides command-line tools that wrap
Python test environment runners such asToxorNox,
invoking them so as the various tests are run in parallel, in groups,
as specified on the command line. This allows the fastest tests to be run
first, and the slower ones to only be started if it makes sense (e.g. if
tools likerufforflake8did not uncover any trivial syntax errors).Thetox-stagestool runs Tox with the specified groups of test
environments, stopping if any of the tests in a group should fail.
This allows quick static check tools like e.g.ruffto stop
the testing process early, and also allows scenarios like running
all the static check tools before the package's unit or functional
tests to avoid unnecessary failures on simple errors.The syntax for grouping the test environments to be run is described in
theparse-stageslibrary's documentation.Running Tox tests in groupsThetox-stagestool may be invoked with a list of stages specified on
the command line:tox-stages run @check @testsIf thetox-stages runcommand is invoked without any stage specifications,
the tool looks for thestageslist of strings in the[tool.test-stages]section of thepyproject.tomlfile:[tool.test-stages]
stages = ["ruff and not @manual", "@check", "@tests"]AuthorThetest-stageslibrary is developed byPeter Pentchevina GitLab repository.