lordmauve / adventurelib

A minimal library for writing text adventure games in Python 3
https://adventurelib.readthedocs.io/
MIT License
153 stars 42 forks source link

Fix test teardown handling #45

Open edmw opened 6 months ago

edmw commented 6 months ago

Using def teardown(): for test teardown code was never officially supported by pytest to my best knowledge.

Running the tests with pytest 8.2.0 does not succeed because teardown never gets called.

This change introduces a fixture to handle the setup and teardown of the commands list.