Behave: How to import steps from another file?
I have just started using behave , a Pythonic BDD framework using Gherkin syntax . behave takes a feature, e.g.: Scenario: Calling the metadata API Given A matching server When I call metadata Then metadata response is JSON And response status code is 200 And a steps file, e.g.: ... @then('response status code is {expected_status_code}') def step_impl(context, expected_status_code): assert_equals(context.response.status_code, int(expected_status_code)) @then('metadata response is JSON') def step_impl(context): json.loads(context.metadata_response.data) ... And combines them to a beautiful test