Coder Social home page Coder Social logo

behave-cucumber-matcher's People

Contributors

dependabot[bot] avatar kieran-ryan avatar

Stargazers

 avatar

behave-cucumber-matcher's Issues

Decouple parameter type discovery from step definitions modules

๐Ÿค” What's the problem you're trying to solve?

Discovery of parameter types and step definitions is currently defined through Behave alphabetically crawling Python modules in the steps directory of an environment, and evaluating each as they are encountered.

As step definitions can be discovered before their referenced parameter types, an UndefinedParameterTypeError can occur - and is more likely when defined in separate modules (alphabetically dependent) compared to in the same modules (hierarchical reference dependent).

However, this may be valid behaviour and there may be performance tradeoffs to consider compared to functionality which is supported as per alternatives defined below.

โœจ What's your proposed solution?

The following are potential solutions to this problem:

  1. Discover parameter types first before discovering step definitions
  2. Discover step definitions first, then parameter types; and then evaluate parameter types referenced in step definition patterns
  3. Discover parameter types and step definitions as they are encountered; and then evaluate parameter types referenced in step definition patterns

โ› Have you considered any alternatives or workarounds?

The following are existing mitigations:

  1. Define parameter types in separate modules and import them into the step definition modules which reference them.
  2. Define parameter types in separate modules, named such that they take alphabetical precedence over modules containing step definitions that reference these parameter types.
  3. Within step definitions modules, define parameter types before any step definitions which reference them.

๐Ÿ“š Any additional context?

No response

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.