-
-
Notifications
You must be signed in to change notification settings - Fork 151
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#505] REFACTOR: fix sub-sub-descriptors ...
... where first from "sub-" ones has no name + TODO: should not we set attrs on instance, not lru_cache __get__ result?
- Loading branch information
Showing
4 changed files
with
81 additions
and
56 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
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,21 @@ | ||
from selene.support._pom import Element, All | ||
|
||
|
||
def test__pom__element_is_unique_for_each_object(): | ||
class Page: | ||
selector = '.element' | ||
element = Element(selector) | ||
elements = All(selector) | ||
|
||
page1 = Page() | ||
page2 = Page() | ||
|
||
assert page1.selector is page2.selector | ||
# but | ||
assert page1.element is not page2.element | ||
assert page1.elements is not page2.elements | ||
# while | ||
assert page1.element is page1.element | ||
assert page1.elements is page1.elements | ||
assert page2.element is page2.element | ||
assert page2.elements is page2.elements |
Empty file.