Code Monkey home page Code Monkey logo

Comments (9)

youtux avatar youtux commented on May 29, 2024 2

I'll keep this in mind when writing the new parser.

from pytest-bdd.

pydolan avatar pydolan commented on May 29, 2024 1

FWIW, there's an official python gherkin parser that might make sense to use instead of pytest-bdd's own parser.

If you want to continue supporting the current multiline step format, then I suggest either adding a new option for users to optionally switch to the pystring/table format Gherkin uses, or maybe even change strict_gherkin to use the Gherkin format.

from pytest-bdd.

bubenkoff avatar bubenkoff commented on May 29, 2024

not sure, it will require quotes or some other symbols to distinguish multiline steps, which is not nicer than
having to stick to predefined format, which is better in many ways, i think

from pytest-bdd.

lrowe avatar lrowe commented on May 29, 2024

Cucumber/Behat/Behave all go with the docstring approach.

I think there's a lot of value in maintaining compatibility with the cucumber gherkin standard, but changing existing parsing rules is not something to be done lightly either.

It might be interesting to experiment with https://github.com/nathforge/gherkin-parser as it claims to be tested against all Cucumber and Behave test cases.

from pytest-bdd.

bubenkoff avatar bubenkoff commented on May 29, 2024

nice project indeed, i'll take a look

from pytest-bdd.

bubenkoff avatar bubenkoff commented on May 29, 2024

@lrowe so we've looked and that parser, and it seems to be ok-ish but needs lots of improvements, and there's no guarantee they will be accepted by the owner.
also to integrate it with pytest-bdd seems like a lot of work
are you sure it worth the effort?

from pytest-bdd.

lrowe avatar lrowe commented on May 29, 2024

I think the indentation sensitivity issue is worth addressing at some point, though I don't have a strong opinion on the best way of doing so.

Out of interest, what type of improvements do you think need to be made to that parser library?

from pytest-bdd.

bubenkoff avatar bubenkoff commented on May 29, 2024

not sure, first of all, it seems a overengineered in part of the parser, and at the same time doesn't have useful data structure to traverse in reverse direction - say from step to scenario and feature. classes would be much better than just dicts for that, and that's why we used them in pytest-bdd
but in general i agree it makes no sense to have multiple parsers of the same simple thing - gherkin language
i feel i'll work on the integration

from pytest-bdd.

rogerrohrbach avatar rogerrohrbach commented on May 29, 2024

I really miss the ability I had in behave to right-align Ands. And it's a keyword, no? Surely the existing parser can be made smarter.

from pytest-bdd.

Related Issues (20)

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.