Skip to main content

Unofficial fan project: Robot Framework keyword library for the pytemon Pokémon-inspired terminal game

Project description

robotframework-pokemon

Robot Framework keyword library for the pytemon Pokemon game.

Disclaimer: This is an unofficial fan project and is not affiliated with, endorsed by, or connected to Nintendo, Game Freak, or The Pokémon Company. Pokémon and all related names are trademarks of Nintendo / Creatures Inc. / GAME FREAK inc. This project is made for educational and entertainment purposes only, with love for the franchise.

Overview

robotframework-pokemon exposes the pytemon game as Robot Framework keywords, allowing you to launch the interactive terminal, inspect save files, and rate trainer skills from a .robot test suite.

Setup

cd robotframework-pokemon/
poetry install

Run the game via Robot Framework

poetry run robot test.robot
# or
./run_robot.sh

Running tests while playing Pokemon

The recommended way to run Robot Framework tests alongside the game is to use the Start Interactive Terminal keyword, which launches the Pokemon game in a new terminal window so your tests can interact with it without blocking the test runner.

This keyword should be placed in a global __init__.robot file as a Suite Setup, so the game is started once before any tests run. Pair it with Post Tests Finished Message as a Suite Teardown to get a clear visual banner in the log when your suite finishes.

__init__.robot

*** Settings ***
Library    PokemonLibrary

Suite Setup       Start Interactive Terminal
Suite Teardown    Post Tests Finished Message    suite_name=Pokemon Suite

The Start Interactive Terminal keyword opens the game in a new window by default. The test suite continues immediately while the player enjoys the game, and any test keywords can interact with the running terminal throughout.

To be explicit about the new-window behaviour:

*** Settings ***
Library    PokemonLibrary

Suite Setup       Start Interactive Terminal    new_window=${True}
Suite Teardown    Post Tests Finished Message    suite_name=Pokemon Suite

Available Keywords

Keyword Description
Start Interactive Terminal Launch the Textual TUI (new window by default)
Send Command Send a command to the running terminal
Get Save Game Stats Return formatted save file statistics
Rate My Trainer Skills Score and grade a trainer's save file
Post Tests Finished Message Log a formatted banner when the suite finishes

Project structure

robotframework-pokemon/
├── PokemonLibrary/    # RF keyword library (wraps pytemon)
│   ├── __init__.py
│   └── library.py
├── atests/            # Robot Framework acceptance tests
├── test.robot         # Main RF launcher
├── run_robot.sh       # Helper script
└── pyproject.toml

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

robotframework_pokemon-1.0.0.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.

robotframework_pokemon-1.0.0-py3-none-any.whl (12.9 kB view details)

Uploaded Python 3

File details

Details for the file robotframework_pokemon-1.0.0.tar.gz.

File metadata

  • Download URL: robotframework_pokemon-1.0.0.tar.gz
  • Upload date:
  • Size: 12.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.12.3 Linux/6.17.0-19-generic

File hashes

Hashes for robotframework_pokemon-1.0.0.tar.gz
Algorithm Hash digest
SHA256 67e4854522cedcfb51e5587c35ec0ca303f8073231b2ccb232c0a930f2ef067d
MD5 eaa26cdfa4a3b75f3c27c53b5d0eee85
BLAKE2b-256 a356e27925552c8be49980917ff4a55f292b21b67e6b3198e5cb647de0090aa8

See more details on using hashes here.

File details

Details for the file robotframework_pokemon-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for robotframework_pokemon-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c911d233051e6ef8e631995458326d262ba358b1ab1ded14895d76e9f67e1c0c
MD5 f94b153afc23ceed81d8b47431cbef07
BLAKE2b-256 c50c1f8cf101d6ebe39ebe94e04b96459925423de75e2606aacd17a8f5fe5038

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