You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running the example test after gauge init python (0.9.0) with an empty @before_step() or @after_step() hook results in an error. This problem does not occur e.g. with the Ruby language runner using gauge init ruby.
Expected behavior: no error, all tests run and pass OK
Actual behavior:
$ gauge run
Python: 3.6.1
Exception occurred while loading step implementations from file: step_impl\step_impl.py.
Traceback (most recent call last):
File "C:\conda3\lib\site-packages\getgauge\impl_loader.py", line 50, in import_file
importlib.import_module(os.path.splitext(rel_path.replace(os.path.sep, '.'))[0])
File "C:\conda3\lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 978, in _gcd_import
File "<frozen importlib._bootstrap>", line 961, in _find_and_load
File "<frozen importlib._bootstrap>", line 950, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 655, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 678, in exec_module
File "<frozen importlib._bootstrap>", line 205, in _call_with_frames_removed
File "C:\bdd-demo\test\step_impl\step_impl.py", line 40, in <module>
@before_step()
TypeError: before_step() missing 1 required positional argument: 'obj'
# Specification Heading
## Vowel counts in single word P P
## Vowel counts in multiple word P P
Successfully generated html-report to => C:\bdd-demo\test\reports\html-report
Specifications: 1 executed 1 passed 0 failed 0 skipped
Scenarios: 2 executed 2 passed 0 failed 0 skipped
Total time taken: 140ms
Steps to reproduce
Create a directory, run gauge init python in it
Append to step_impl/step_impl.py:
@before_step()defbefore_step_hook():
pass
Run example test using gauge run
Version Information
Gauge version: 0.9.0
Gauge Python plugin version: 0.2.0
Python version: 3.6.1 (anaconda)
getgauge package version: 0.2.0
OS information: Windows 7 x64
The text was updated successfully, but these errors were encountered:
afeique
changed the title
@before_step, @after_step execution hooks do not work (python 3.6, gauge-python
@before_step, @after_step execution hooks do not work (python 3.6, gauge-python 0.2.0)
Jul 28, 2017
afeique
changed the title
@before_step, @after_step execution hooks do not work (python 3.6, gauge-python 0.2.0)
@before_step, @after_step execution hooks do not work (gauge-python 0.2.0)
Jul 28, 2017
afeique
changed the title
@before_step, @after_step execution hooks do not work (gauge-python 0.2.0)
@before_step, @after_step execution hooks do not work (gauge 0.9.0, gauge-python 0.2.0)
Jul 28, 2017
Description
Running the example test after
gauge init python
(0.9.0) with an empty@before_step()
or@after_step()
hook results in an error. This problem does not occur e.g. with the Ruby language runner usinggauge init ruby
.Expected behavior: no error, all tests run and pass OK
Actual behavior:
Steps to reproduce
gauge init python
in itstep_impl/step_impl.py
:gauge run
Version Information
getgauge
package version: 0.2.0The text was updated successfully, but these errors were encountered: