Support for boolean pattern
See original GitHub issueHi!
Would it possible to have support for boolean pattern? such as true or false converts it to boolean in a step pattern?
For instance:
@given("This is {condition:B}")
def example(step, condition:bool):
pass
I am more than willing to implement this if this is an acceptable feature!
Issue Analytics
- State:
- Created 6 years ago
- Comments:14 (12 by maintainers)
Top Results From Across the Web
How boolean Type Work in XML with Examples - eduCBA
XML boolean type is an XSD Simple Data types that represent True or False or Yes / No values as their types and...
Read more >xs:boolean - XML Schema [Book] - O'Reilly
Name xs:boolean — Boolean (true or false). Derived from: xs:anySimpleType Primary: xs:boolean Known subtypes: none Facets: xs:pattern, xs:whiteSpace ...
Read more >How to use patterns to specify variable type as Boolean (True ...
What is important though is, that I want x to be a real number, and y to be a boolean variable, such that...
Read more >To use a Geometry Pattern in Boolean Operations - PTC Support
Click Boolean Operations. The Boolean Operations tab opens. 2. Under Operation, click Merge.
Read more >Boolean data type in Python - GeeksforGeeks
The Boolean and operator returns False if any one of the inputs is False else returns True. A, B, A and B. True,...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Hmm well then, I have some buggy code somewhere then!
I would really only go for
true TRUE True false FALSE False, really, any variants of true and false.And I agree about the custom parser, but writing a custom parser for all the variants where we want to check a situation with a binary outcome to have it closer to English is a little tedious, it’s nothing impossible it’s just gonna be a lot of troubles and a source of bugs that we don’t really need.
I’ll be making a PR in the next days!
You should add
onandoffwhile you are at it.