Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 2 additions & 0 deletions pyrox/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"""

from . import (
core,
interfaces,
services,
models,
Expand All @@ -15,6 +16,7 @@


__all__ = (
'core',
'interfaces',
'services',
'models',
Expand Down
5 changes: 5 additions & 0 deletions pyrox/core/formatters.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
"""General formatters for strings within the pyrox environment.
"""



Empty file added test/services/__init__.py
Empty file.
Empty file added test/services/cli/__init__.py
Empty file.
Empty file.
44 changes: 44 additions & 0 deletions test/services/cli/test_core.py
Original file line number Diff line number Diff line change
@@ -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"
Loading