spyoungtech / behave-webdriver

Selenium webdriver step library for use with the behave BDD testing framework
MIT License
62 stars 21 forks source link

pycharm BDD matcher workaround #76

Closed spyoungtech closed 5 years ago

spyoungtech commented 5 years ago

Fixes step matching in PyCharm. Resolves #75

There are two key problems solved here:

  1. PyCharm won't recognize custom matchers (IE the transform matchers introduced in 0.2.0)
  2. PyCharm will only match on the first matcher used in the file (e.g. first use of use_step_matcher)

To resolve (1) a conditional statement was added to 'fool' PyCharm by having a conditional statement (which will resolve False) to execute use_step_matcher with a non-custom matcher.

To resolve (2) regex actions steps were split to a separate file from parse matcher steps.

coveralls commented 5 years ago

Coverage Status

Coverage decreased (-0.3%) to 96.044% when pulling 821501622a8fc2b08cc1c2c24ce387374d7565ff on pycharm-matching-patch into f115abcd72eb0152cf82d0f77bc400be32ff61ae on master.