semvec/pypi-packages huggingface dataset:
ndjson-testrunner 1.1.3
A test runner that outputs newline delimited JSON results
Requires Python: >=3.9

ndjson TestRunner |pypi-badge|
==============================

Exports `JSONTestRunner`, a unittest_ ``TestRunner`` class that outputs ndjson_. One JSON record per test result:

.. code-block:: javascript

	{
		"type": "success" | "expected_failure" | "failure" | "error" | "unexpected_success" | "skip",
		"id":   "module.TestClass.test_function",
		"desc": null | "First line of test function docstring",
		"msg":  null | "Exception traceback or reason for skipping"
	}

To be used for test result storage or interprocess communication.

Usage
-----

Use it programmatically:

>>> import unittest
>>> from ndjson_testrunner import JSONTestRunner
>>> unittest.main("test_module_name", testRunner=JSONTestRunner)

or from the command line:

.. code-block:: bash

   python -m ndjson_testrunner test_module_name

Check out e.g. how `IRKernel’s usage`_ looks.

.. _unittest: https://docs.python.org/3/library/unittest.html
.. _ndjson: http://ndjson.org
.. _IRKernel’s usage: https://github.com/IRkernel/IRkernel/blob/master/tests/testthat/test_kernel.r

.. |pypi-badge| image:: https://img.shields.io/pypi/v/ndjson-testrunner.svg?style=flat-square
	:target: https://pypi.python.org/pypi/ndjson-testrunner
Calculator-tvaino 0.0.14
Basic arithmetic operations
Requires Python: >=3.8

# Calculator package

This package is a calculator class that performs basic arithmetical operations: addition, substraction, multiplication, devision and taking root.

## Installation

You can install the package through pip:

pip install Calculator_tvaino

## Usage

1. Importing calculator to your Python project:

*from Calculator import Calculator*

2. Create an instance of the Calculator class:

*Calc = Calculator()*

3. Perform arithmetic operations by calling the appropriate methods and store the to the memory:

- Addition: add(number)
- Subtraction: subtract(number)
- Multiplication: multiply(number)
- Division: divide(number)
- Square root: root(number)

Example:

*calc.add(4)* #adds 4 to the memory value
*calc.divide(2)* #devides the value of memory by 2
*calc.multiply(3)* #multiplies the value of memory by 3
*calc.dvivde(4)* #devides the value of memory by 4
*calc.root(3)* #takes cube root of the memory value

4. Access the current result by calling the memory attribute "mem":

*print(calc.mem)* #prints the result of arithmetical operations stored in memory

5. Clear the memory:

*calc.reset* #restets the memory to zero. **Clear the memory before starting a new sequence of arithmetic operations!**

6. Example:

<font color="green">\# Import Calculator</font> 

from Calculator_tvaino.Calculator import Calculator

<font color="green">\# Create a Calculator instance.</font>  
calc = Calculator()

<font color = "green">\# Perform arithmetic operations.</font>  
calc.add(5)  
calc.multiply(3)  
calc.divide(2)  

<font color = "green">\# Access the result.</font>  
print("Result:", calc.mem)  <font color = "green"># Output: 7.5</font>  

<font color = "green">\# Reset the memory.</font>  
calc.reset()  

<font color = "green">\# Take square root of the memory value</font>  
calc.root(2)

<font color = "green">\# Access the result.</font>  
print(calc.mem) <font color = "green">  # Output: 4.0</font>

#Tests performed