From 4294510667c2359c63267e6805e4937dce4a7051 Mon Sep 17 00:00:00 2001 From: Matěj Cepl Date: Wed, 2 Oct 2013 11:18:44 +0200 Subject: Add get_step function to find target for given feature. --- cucutags.py | 7 +++++++ 1 file changed, 7 insertions(+) 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. -- cgit