-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Alexander Koshkin
committed
Sep 30, 2018
1 parent
72ff503
commit 40a2a9a
Showing
3 changed files
with
36 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import py.test | ||
|
||
|
||
import watch | ||
|
||
|
||
def test_pridicated_bind_to_watchme(): | ||
"""Tests, that using a watch's validators inside a class, that not being | ||
inherited from WatchMe base class generates an error. | ||
""" | ||
|
||
with py.test.raises(TypeError): | ||
|
||
class SomeClass: | ||
foo = watch.builtins.Whatever | ||
|
||
s = SomeClass() | ||
s.foo = 10 | ||
|
||
|
||
def test_pridicated_bind_to_watchme(): | ||
"""Tests, that AttributeError is not broken by introducing watch lib. | ||
""" | ||
|
||
with py.test.raises(AttributeError): | ||
|
||
class SomeClass(watch.WatchMe): | ||
foo = watch.builtins.Whatever | ||
|
||
s = SomeClass() | ||
s.foo | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters