Skip to content

If you have just one story in your collection, you can run it directly by using .one().

Code Example


Do thing:
    - Do thing

from hitchstory import BaseEngine
from code_that_does_things import *

class Engine(BaseEngine):
    def do_thing(self):

With code:

from hitchstory import StoryCollection
from pathlib import Path
from engine import Engine

story = StoryCollection(Path(".").glob("*.story"), Engine()).one()

Will output:

RUNNING Do thing in /path/to/working/example.story ... SUCCESS in 0.1 seconds.

Executable specification

Documentation automatically generated from one-story.story storytests.