Skip to main content

P Test Platform Tools Base Lib

Project description

ptools-base

P Test Platform Tools Base Lib

How to install

pip install -U ptools-base

How to write assert

from ptools_base.tool import write_asserts
from ptools_base.schema import AssertSchema, AssertSchemaResultEnum

write_asserts(
    [
        AssertSchema(
            result=AssertSchemaResultEnum.SUCCESS,
            content="your assert content"
        ),
        AssertSchema(
            result=AssertSchemaResultEnum.FAILED,
            content="your assert content"
        ),
        AssertSchema(
            result=AssertSchemaResultEnum.SKIPPED,
            content="your assert content"
        )
    ]
)

How to copy extra data

from ptools_base.tool import copy_2_extra

# copy file to extra
file_path = "your file path"
copy_2_extra(file_path)

# copy dir to extra
dir_path = "your dir path"
copy_2_extra(dir_path)

How to write env

from ptools_base.schema import EnvSchema
from ptools_base.tool import write_envs

write_envs([EnvSchema(key="your env key", value="your env value")])

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ptools_base-1.1.1.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ptools_base-1.1.1-py3-none-any.whl (3.1 kB view details)

Uploaded Python 3

File details

Details for the file ptools_base-1.1.1.tar.gz.

File metadata

  • Download URL: ptools_base-1.1.1.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.8.10

File hashes

Hashes for ptools_base-1.1.1.tar.gz
Algorithm Hash digest
SHA256 1bc43ed7ca185426469db38bc74f02002e178afc57ce1eb323a8f18a4ef903a5
MD5 8823eb128b5e09b6f38eb19f41cd50d2
BLAKE2b-256 5e963272cfd8055ec3875868504d463238dc2355e3b94b4c698271c5ebe6cd02

See more details on using hashes here.

File details

Details for the file ptools_base-1.1.1-py3-none-any.whl.

File metadata

  • Download URL: ptools_base-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 3.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.8.10

File hashes

Hashes for ptools_base-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 36687462ca989c91fca5b8b1caf2533fdd31c7acac54dd00db2677483fb3509e
MD5 b43d9712e7cc392a46570dffdbdce626
BLAKE2b-256 d0263d69870a293c685d749ab1973e05f7612ea7e23e311ec2330abf7210e419

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page