Skip to main content

Package used for testing homework assignments in the IB110 course at FI MUNI.

Project description

This library was created for the course IB110 - Introduction to Informatics at MUNI FI. It builds on top of the ib110hw and the hypothesis libraries.

Setup

Python version required for this library is >=3.6. It can be installed using pip like so: pip install ib110hw_testing

Using venv to install the library is recommended as it has some dependencies (ib110hw, exrex, hypothesis).

Modules

Testing

The module testing contains some predefined strategies which can be used with the hypothesis library.

Example Use-case

Below code shows a simple example of strategies used with tests.

from hypothesis import given
from ib110hw.automaton.dfa import DFA
from ib110hw_testing.testing.strategies import dfas, strings_from_regex
from typing import Set

@given(
    dfas(alphabet={"a", "b", "c"}),
    strings_from_regex(regex="[abc]*")
)
def test(dfa: DFA, strings: Set[str])
    ...

Transformation

The module transformation contains implementations of some algorithms which can be used to transform automata.

Example Use-case

Below code shows a simple example of automata comparison.

from ib110hw.automaton.dfa import DFA
from ib110hw.automaton.nfa import NFA
from ib110hw_testing.transformation.transformation import compare_automata

nfa: NFA = NFA(...) # an arbitrary NFA
dfa: DFA = DFA(...) # an arbitrary DFA

compare_automata(nfa, dfa) # returns True/False

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

ib110hw_testing-0.1.11.tar.gz (12.5 kB view details)

Uploaded Source

Built Distribution

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

ib110hw_testing-0.1.11-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file ib110hw_testing-0.1.11.tar.gz.

File metadata

  • Download URL: ib110hw_testing-0.1.11.tar.gz
  • Upload date:
  • Size: 12.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.15 CPython/3.6.8 Windows/10

File hashes

Hashes for ib110hw_testing-0.1.11.tar.gz
Algorithm Hash digest
SHA256 bc1fbbdbb4e66a4e965c188e5d845016807c8d0b8cf7bbdb35365ce7625f09cb
MD5 901062cdcfc0d6af2e5e75d48cba34d8
BLAKE2b-256 d4a7b4eb447ce6828ed8e4bfe872071b3a4e39da31ccdf3c2895987cf98be111

See more details on using hashes here.

File details

Details for the file ib110hw_testing-0.1.11-py3-none-any.whl.

File metadata

  • Download URL: ib110hw_testing-0.1.11-py3-none-any.whl
  • Upload date:
  • Size: 5.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.15 CPython/3.6.8 Windows/10

File hashes

Hashes for ib110hw_testing-0.1.11-py3-none-any.whl
Algorithm Hash digest
SHA256 56fbfc8565937a203213102e54b55b88ed3eb6144d3c7aac4042b0fed6b940e1
MD5 5a4c9423db540c2f2d181297510dfb76
BLAKE2b-256 335c0f143a121f36919eb03017702be1e7c05859d744f7bc766f932b12beaf59

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