Skip to content

Commit

Permalink
[py] Get subtyping tests working
Browse files Browse the repository at this point in the history
  • Loading branch information
AutomatedTester committed Oct 13, 2020
1 parent b2df2c3 commit 5a189b9
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

def test_web_element_not_subclassed():
"""A registered subtype of WebElement should work with isinstance checks."""
class MyWebElement(object):
class MyWebElement:
def __init__(self, parent, id, _w3c=True):
self.parent = parent
self.id = id
Expand All @@ -33,7 +33,7 @@ def __init__(self, parent, id, _w3c=True):
assert not isinstance(my_web_element, WebElement)

# Register the class as a subtype of WebElement
WebElement.register('MyWebElement')
WebElement.register(MyWebElement)
my_registered_web_element = MyWebElement('parent', '2')

assert isinstance(my_registered_web_element, WebElement)
Expand Down

0 comments on commit 5a189b9

Please sign in to comment.