diff options
author | Matěj Cepl <mcepl@redhat.com> | 2013-10-02 11:18:44 +0200 |
---|---|---|
committer | Matěj Cepl <mcepl@redhat.com> | 2013-10-02 11:18:44 +0200 |
commit | 4294510667c2359c63267e6805e4937dce4a7051 (patch) | |
tree | 6f49176526c58a1ef4b4a534114188c1e3ae0e9c | |
parent | d11bbfb94d93b8c8f711e3a65c9b6b50a3592ce7 (diff) | |
download | cucutags-4294510667c2359c63267e6805e4937dce4a7051.tar.gz |
Add get_step function to find target for given feature.
-rwxr-xr-x | cucutags.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/cucutags.py b/cucutags.py index 14c8ce0..cd01dcf 100755 --- a/cucutags.py +++ b/cucutags.py @@ -171,6 +171,13 @@ def matcher(features, targets, out_dir): return out +def get_step(feature, feat_list, target_list): + for feat in feat_list: + trg = feat.match(target_list) + if trg: + return trg.filename, trg.lineno + + if __name__ == "__main__": desc = """ Generate tags from Behave feature files and steps. |