-
Notifications
You must be signed in to change notification settings - Fork 152
Fireplace Test Suite
Benedict Etzel edited this page Nov 20, 2015
·
1 revision
The Fireplace test suite is a set of files in the test/
directory used for continuos integration.
It currently consists of the following files:
- test_dsl.py: tests for DSL selectors and picks
- test_exceptions.py: tests for which the simulator should exceptions
- test_hero_powers.py: tests for all hero powers
- test_interactions.py: special interactions
- test_main.py: functional tests for cards (will be split eventually)
- test_mechanics.py: tests for basic game mechanics (such as Stealth, Mana, Windfury...)
Additionally, utils.py
provides a set of common functions and a BaseTestGame
without mana restrictions, useful for testing:
-
prepare_game
: Sets up a game for immediate testing, by randomly drafting the decks and skipping the Mulligan phase. You can pass the hero classes for both players. -
prepare_empty_game
: Likeprepare_game
, but with empty decks for both players and no fatigue damage. Useful for testing Jousts or cards that activate on draw (e.g. Flame Leviathan).
The test suite can be easily run with py.test. You can run python setup.py develop
so that Python can always import the latest fireplace
files. You can filter tests by running py.test -k <test name>
in order to only execute functions that contain the specificied string.
- The Fireplace Card API
- The Fireplace DSL
- Card introspection
- Creating and playing a Game
- The CardDefs.xml file
- Developer Quick Start
- How to enable logging in Hearthstone
- Frequently Asked Questions
- Game State
- Game Actions
- Powers and Card Actions
- Target Selection
- Events
- Enchantments