https://github.com/cybercoral/pytesting
A Python library that contains tools for unit testing.
https://github.com/cybercoral/pytesting
python python3 qa qa-automation unit-testing
Last synced: 4 months ago
JSON representation
A Python library that contains tools for unit testing.
- Host: GitHub
- URL: https://github.com/cybercoral/pytesting
- Owner: CyberCoral
- License: gpl-3.0
- Created: 2024-12-06T16:46:21.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-12-18T15:12:20.000Z (5 months ago)
- Last Synced: 2025-01-11T18:10:52.560Z (4 months ago)
- Topics: python, python3, qa, qa-automation, unit-testing
- Language: Python
- Homepage:
- Size: 77.1 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PyTesting
A Python library that contains tools for unit testing.# How to install (with pip)
Since version 2.1, PyTesting can be installed with pip installer.
To do that, you must type this command in your terminal:```pip install PyTestingQA```
(Do not worry about the name of the project, PyTestingQA is the PyPi's name of the project,
PyTesting and PyTestingQA are virtually the same).# How to use
To use the project, you have two options:### Program execution.
If you execute the program as a main module, it will
print a small description of the project.### Tool use.
Instead, if you import the module to your project or
you build your own code on the library's file, you will
be able to use it directly.### Example of use.
You can use PyTesting (PyTestingQA) in two main ways, depending of the
way you import PyTesting:1st way: You import PyTesting (PyTestingQA) like this:
```
import PyTestingQA
test = [("1+1",2)]
PyTestingQA.PyTesting.UnitaryTests.TestingMethod(test)
```This is the result of running the code:
```
Test1: Test (1+1) has returned the expected result (2).{('1+1', 2): True}
```2nd way: You import PyTesting (PytestingQA):
```
import PyTestingQA.PyTesting as PyTesting
test = [("1+1",2)]PyTesting.UnitaryTests.TestingMethod(test)
```This is the result of running the code:
```
Test1: Test (1+1) has returned the expected result (2).{('1+1', 2): True}
```# Remember to read the code's comments, they contain very useful information.