-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: ASyncGenericSingleton when flag defined on class def (#103)
- Loading branch information
1 parent
fafe58f
commit 2421f0d
Showing
2 changed files
with
61 additions
and
14 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,20 @@ | ||
|
||
from a_sync.singleton import ASyncGenericSingleton | ||
|
||
def test_flag_predefined(): | ||
"""We had a failure case where the subclass implementation assigned the flag value to the class and did not allow user to determine at init time""" | ||
class Test(ASyncGenericSingleton): | ||
sync=True | ||
def __init__(self): | ||
... | ||
Test() | ||
class TestInherit(Test): | ||
... | ||
TestInherit() | ||
|
||
class Test(ASyncGenericSingleton): | ||
sync=False | ||
Test() | ||
class TestInherit(Test): | ||
... | ||
TestInherit() |