diff --git a/README.md b/README.md index cd45274..5cd247a 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ [![Python Version](https://img.shields.io/badge/python-3.13+-blue.svg)](https://www.python.org/downloads/) [![License](https://img.shields.io/badge/license-GPL--3.0-green.svg)](LICENSE) ![Development Status](https://img.shields.io/badge/status-beta-orange.svg) -![Version](https://img.shields.io/badge/version-3.6.11-blue.svg) +![Version](https://img.shields.io/badge/version-3.6.13-blue.svg) **Pyrox** is a Python back-end engine and application framework built on **PyQt6**. It provides a rich set of interfaces, models, services, and abstractions for building industrial automation and desktop applications. Pyrox is designed to be used as a foundation — downstream projects like [ControlRox](https://github.com/iroxusux/ControlRox) build their entire application layer on top of it. diff --git a/pyproject.toml b/pyproject.toml index ea5770b..366d457 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "pyrox" -version = "3.6.11" +version = "3.6.13" authors = [{ name = "Brian LaFond", email = "Brian.L.LaFond@gmail.com" }] description = "Python based irox engine." readme = "README.md" diff --git a/pyrox/__init__.py b/pyrox/__init__.py index 698336e..67bc091 100644 --- a/pyrox/__init__.py +++ b/pyrox/__init__.py @@ -4,6 +4,7 @@ """ from . import ( + core, interfaces, services, models, @@ -15,6 +16,7 @@ __all__ = ( + 'core', 'interfaces', 'services', 'models', diff --git a/pyrox/core/formatters.py b/pyrox/core/formatters.py new file mode 100644 index 0000000..7f052bc --- /dev/null +++ b/pyrox/core/formatters.py @@ -0,0 +1,5 @@ +"""General formatters for strings within the pyrox environment. +""" + + + diff --git a/test/services/__init__.py b/test/services/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/test/services/cli/__init__.py b/test/services/cli/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/test/services/cli/alt/__init__.py b/test/services/cli/alt/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/test/services/cli/test_core.py b/test/services/cli/test_core.py new file mode 100644 index 0000000..7941bbd --- /dev/null +++ b/test/services/cli/test_core.py @@ -0,0 +1,44 @@ +import pytest + +from pyrox.services.cli.core import ANSIFormatter + + +class TestAnsiFormatter: + + def test_cannot_init(self): + with pytest.raises(TypeError): + ANSIFormatter() + + def test_move_home(self): + assert ANSIFormatter.move_home() + + def test_esc_seq(self): + assert ANSIFormatter.ESC == '\033[' + + def test_enter_pressed_chars(self): + assert ' ' in ANSIFormatter.ENTER_CHARS + assert '\r' in ANSIFormatter.ENTER_CHARS + + def test_cursor_up(self): + for x in range(256): + assert ANSIFormatter.cursor_up(x) == f'\033[{x}A' + + def test_cursor_down(self): + for x in range(256): + assert ANSIFormatter.cursor_down(x) == f'\033[{x}B' + + def test_cursor_right(self): + for x in range(256): + assert ANSIFormatter.cursor_right(x) == f'\033[{x}C' + + def test_cursor_left(self): + for x in range(256): + assert ANSIFormatter.cursor_left(x) == f'\033[{x}D' + + def test_text_color(self): + for x in range(256): + assert ANSIFormatter.text_color_256(x) == f"\033[38;5;{x}m" + + def test_bg_color(self): + for x in range(256): + assert ANSIFormatter.bg_color_256(x) == f"\033[48;5;{x}m"