diff options
author | Lars Wirzenius <liw@liw.fi> | 2019-06-01 22:00:48 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2019-06-01 22:00:48 +0300 |
commit | 082c01bcb2234004d48f99c82d2b0c2570023136 (patch) | |
tree | ba2cefa9543d8c8201434555c24095f28e75fb40 | |
parent | f018f576993c86a73f0a730ffa56e67e328c7aaf (diff) | |
download | fable-poc-082c01bcb2234004d48f99c82d2b0c2570023136.tar.gz |
Add: a second scenario
-rwxr-xr-x | ftt-codegen | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/ftt-codegen b/ftt-codegen index 7e01553..ef6e3b9 100755 --- a/ftt-codegen +++ b/ftt-codegen @@ -144,11 +144,13 @@ for s in fable.get_scenarios(): if not s.is_empty(): scenarios.append(s) +f = sys.stdout for s in scenarios: - debug('scenario: {}'.format(s.get_name())) + name = s.get_name() + debug('scenario: {}'.format(name)) for step in s.get_steps(): debug(' step: {}'.format(step)) - codegen(sys.stdout, step, bindings) - sys.stdout.write('print("OK")\n') + codegen(f, step, bindings) + f.write('print("OK: %s" % "{}")\n'.format(name)) debug('ok') |