spyoungtech / behave-webdriver

Selenium webdriver step library for use with the behave BDD testing framework
MIT License
62 stars 21 forks source link

TypeError: issubclass() arg 1 must be a class #69

Closed spyoungtech closed 5 years ago

spyoungtech commented 5 years ago

There is a bug where if a transformer class is not set, this error will occur.

spyoungtech commented 5 years ago

The error comes from line 111 this in transformers.py

transformer_class = context.transformer_class if 'transformer_class' in context else None
if transformer_class and (isinstance(transformer_class, partial) and issubclass(transformer_class.func, TransformerBase)) or issubclass(transformer_class, TransformerBase):

The original intent was that if transformer_class ... should have short-circuited. However, the or clause is still evaluated. The entire part after the first and should be parenthesized.

spyoungtech commented 5 years ago

Fixed in #70 -- v0.2.2