Repository: kidosoft/Morelia

Issue:
initial step matching is done with non-augmented predicates when show_all_missing=True
* Morelia version: 0.7.1
* Python version: 2.7

### Description

`show_all_missing=True` does an initial matching pass where the `augmented_predicate` is not augmented yet

this prevents using a regex like `(\d+)` to match steps which have numeric variable substitutions because the regex needs to match `<variable_name>` instead

if I set `show_all_missing=False` then I can regex match on augmented predicates like I wanted

Discussion:

Patch:
diff --git a/CHANGES.rst b/CHANGES.rst
index b0066c2..e8bd1aa 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -10,6 +10,10 @@ and this project adheres to `Semantic Versioning <http://semver.org/>`_.
 Version: Unreleased
 ===============================================================================
 
+FIXED
+-----
+
+  * matching steps with augmented predicate (#123)
 
 Version: 0.7.1 (2019-01-15)
 ===============================================================================
diff --git a/morelia/visitors.py b/morelia/visitors.py
index 8d25552..c55b9c9 100644
--- a/morelia/visitors.py
+++ b/morelia/visitors.py
@@ -184,3 +184,6 @@ class StepMatcherVisitor(IVisitor):
         if suggest:
             diagnostic = u'Cannot match steps:\n\n{}'.format(suggest)
             self._suite.fail(to_docstring(diagnostic))
+
+    def permute_schedule(self, node):
+        return node.permute_schedule()


Test patch:
diff --git a/example/test_acceptance.py b/example/test_acceptance.py
index dbf8272..3131e82 100644
--- a/example/test_acceptance.py
+++ b/example/test_acceptance.py
@@ -31,7 +31,7 @@ class CalculatorTestCase(unittest.TestCase):
         self.calculator.on()
 
     def step_I_enter_a_number_into_the_calculator(self, number):
-        r'I enter "(.+)" into the calculator'  # match by regexp
+        r'I enter "(\d+)" into the calculator'  # match by regexp
         self.calculator.push(int(number))
 
     def step_I_press_add(self):  # matched by method name