Ejemplo n.º 1
0
def regressfile(filename):
    """
    Run all stories in filename 'filename'.
    """
    StoryCollection(
        pathquery(DIR.key).ext("story"), Engine(DIR, {"overwrite artefacts": False})
    ).in_filename(filename).ordered_by_name().play()
Ejemplo n.º 2
0
def regression():
    """
    Run all stories.
    """
    print(
        StoryCollection(pathq(DIR.key).ext("story"), Engine(
            DIR, {})).only_uninherited().ordered_by_name().play().report())
Ejemplo n.º 3
0
def test(*words):
    """
    Run test with words.
    """
    print(
        StoryCollection(pathq(DIR.key).ext("story"),
                        Engine(DIR, {})).shortcut(*words).play().report())
Ejemplo n.º 4
0
def regression():
    """
    Run all stories
    """
    StoryCollection(
        pathquery(DIR.key).ext("story"), Engine(DIR)
    ).ordered_by_name().play()
Ejemplo n.º 5
0
def bdd(*keywords):
    """
    Run story with name containing keywords.
    """
    StoryCollection(pathquery(DIR.key).ext("story"), Engine(DIR)).shortcut(
        *keywords
    ).play()
Ejemplo n.º 6
0
def bdd(*words):
    """
    Run story with words.
    """
    StoryCollection(
        pathquery(DIR.key).ext("story"),
        Engine(DIR, {"rewrite": True})).shortcut(*words).play()
Ejemplo n.º 7
0
def regression():
    """
    Continuos integration - lint and run all stories.
    """
    lint()
    StoryCollection(
        pathquery(DIR.key).ext("story"), Engine(DIR, {"overwrite artefacts": False})
    ).only_uninherited().ordered_by_name().play()
Ejemplo n.º 8
0
def ci():
    """
    Continuous integration - run all tests and linter.
    """
    lint()
    print(
        StoryCollection(pathq(DIR.key).ext("story"),
                        Engine(DIR, {})).ordered_by_name().play().report())
Ejemplo n.º 9
0
def rewriteall():
    """
    Run regression tests with story rewriting on.
    """
    print(
        StoryCollection(
            pathquery(DIR.key).ext("story"),
            Engine(DIR, {"rewrite": True})).ordered_by_name().play().report())
Ejemplo n.º 10
0
def testfile(filename):
    """
    Run all stories in filename 'filename'.
    """
    StoryCollection(
        pathquery(DIR.key).ext("story"), Engine(
            DIR,
            {"rewrite": True})).in_filename(filename).ordered_by_name().play()
Ejemplo n.º 11
0
def regression():
    """
    Regression test - run all tests and linter.
    """
    lint()
    results = (StoryCollection(
        pathquery(DIR.key).ext("story"), Engine(DIR,
                                                {})).ordered_by_name().play())
    print(results.report())
Ejemplo n.º 12
0
def bdd(*words):
    """
    Run story in BDD mode that matches keywords (e.g. tdd wait finished)
    """
    print(
        StoryCollection(
            pathq(DIR.key).ext("story"),
            Engine(DIR, {"overwrite artefacts": True})).shortcut(
                *words).play().report())
Ejemplo n.º 13
0
def test(*words):
    """
    Run test with words.
    """
    print(
        StoryCollection(
            pathq(KEYPATH).ext("story"), Engine(KEYPATH, {"overwrite artefacts": True})
        ).shortcut(*words).play().report()
    )
Ejemplo n.º 14
0
def regression():
    """
    Run regression testing - lint and then run all tests.
    """
    lint()
    print(
        StoryCollection(
            pathq(DIR.key.joinpath("story")).ext("story"),
            Engine(DIR, {})).ordered_by_name().play().report())
Ejemplo n.º 15
0
def regression():
    """
    Regression test - run all tests and linter.
    """
    lint()
    StoryCollection(
        pathquery(DIR.key).ext("story"),
        Engine(DIR, {"overwrite artefacts": False
                     })).only_uninherited().ordered_by_name().play()
Ejemplo n.º 16
0
def ci():
    """
    Run all stories.
    """
    lint()
    print(
        StoryCollection(
            pathq(KEYPATH).ext("story"), Engine(KEYPATH, {})
        ).ordered_by_name().play().report()
    )
Ejemplo n.º 17
0
def rewrite():
    """
    Run all stories and rewrite any with different output.
    """
    print(
        StoryCollection(
            pathq(DIR.key).ext("story"),
            Engine(DIR,
                   {"overwrite artefacts": True
                    })).only_uninherited().ordered_by_name().play().report())
Ejemplo n.º 18
0
def bdd(*keywords):
    """
    Run story with name containing keywords.
    """
    StoryCollection(
        pathquery(DIR.key).ext("story"),
        Engine(
            DIR,
            {
                "overwrite artefacts": False,
                "print output": True,
            },
        )
    ).shortcut(*keywords).play()
Ejemplo n.º 19
0
def _storybook(**kwargs):
    return StoryCollection(pathquery(DIR.key).ext("story"), Engine(DIR, **kwargs))
Ejemplo n.º 20
0
def _stories(engine):
    return StoryCollection(
        pathquery(DIR.project / "story").ext("story"), engine)
Ejemplo n.º 21
0
def _storybook(settings):
    return StoryCollection(
        pathquery(DIR.key).ext("story"), Engine(DIR, settings))
Ejemplo n.º 22
0
def _stories(parser, rewrite=False):
    return StoryCollection(
        pathquery(DIR.project / "examples").ext("story"),
        Engine(parser, rewrite=rewrite))
Ejemplo n.º 23
0
def _exercisebook(rewrite=False):
    return StoryCollection(
        pathquery(DIR.project / "exercises").ext("story"),
        engine.Engine(DIR, rewrite=rewrite))
Ejemplo n.º 24
0
def _story_collection(rewrite=False, debug=False):
    return StoryCollection(
        pathquery(DIR.key).ext("story"), Engine(DIR, rewrite, debug))
Ejemplo n.º 25
0
 def _stories(self, engine):
     return StoryCollection(
         pathquery(self._path.key / "story").ext("story"),
         engine,
     )