28 lines
923 B
Python
28 lines
923 B
Python
import pytest
|
|
|
|
class TestSystemPrompt:
|
|
"""
|
|
Checks that the system prompt contains
|
|
key instructions and basic rules.
|
|
"""
|
|
|
|
def test_prompt_not_empty(self, sys_prompt) -> None:
|
|
assert isinstance(sys_prompt, str)
|
|
assert sys_prompt.strip() != ""
|
|
|
|
def test_instructs_slovak_language(self, sys_prompt) -> None:
|
|
assert "slovak" in sys_prompt.lower()
|
|
|
|
def test_has_boundaries_section(self, sys_prompt) -> None:
|
|
assert "<boundaries>" in sys_prompt
|
|
assert "</boundaries>" in sys_prompt
|
|
|
|
def test_forbids_legal_advice(self, sys_prompt) -> None:
|
|
assert "legal advice" in sys_prompt.lower()
|
|
|
|
def test_autocomplete_preferred(self, sys_prompt) -> None:
|
|
assert "always prefer autocomplete" in sys_prompt.lower()
|
|
|
|
def test_page_starts_at_zero(self, sys_prompt) -> None:
|
|
assert "page numbering starts at 0" in sys_prompt.lower()
|
|
|