Skip to content

Commit

Permalink
tests: add tests for attrs expected functionality
Browse files Browse the repository at this point in the history
Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de>
  • Loading branch information
Emantor committed Jul 18, 2017
1 parent a760474 commit 60538b6
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/test_resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,14 @@ def test_create_managed_resource(target):
resource_1 = ManagedResource(target)
resource_2 = ManagedResource(target)
assert resource_1.manager is resource_2.manager

def test_hash_is(target):
resource1 = Resource(target)
resource2 = Resource(target)
assert resource1 is not resource2

def test_hash_set(target):
resource1 = Resource(target)
k = set()
k.add(resource1)
assert resource1 in k

0 comments on commit 60538b6

Please sign in to comment.