Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
396 views
in Technique[技术] by (71.8m points)

I am trying to unit test Behave files in python. Does anyone know what type the context parameter is that Behave uses?

Tests in Behave are written as (for example)

Then parameters will have the following values
| name  | val |
| name1 | 5   |
| name2 | 7   |

then in the supporting python the python will have

@then("parameters will have the following values")
def check_values(context):

I am trying to unittest the python and i don't know how to create a unit test for the check_values function because i am not sure how to create something to pass in as the context parameter. Does anyone know?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...