Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
transaction
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
transaction
Commits
e5874464
Commit
e5874464
authored
Dec 17, 2012
by
Tres Seaver
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean out module-scope imports: .tests.test_weakset
parent
fb2f9ce1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
8 deletions
+9
-8
transaction/tests/test_weakset.py
transaction/tests/test_weakset.py
+9
-8
No files found.
transaction/tests/test_weakset.py
View file @
e5874464
...
...
@@ -11,15 +11,12 @@
# FOR A PARTICULAR PURPOSE
#
##############################################################################
import
unittest
from
transaction.weakset
import
WeakSet
class
Dummy
:
pass
class
WeakSetTests
(
unittest
.
TestCase
):
def
test_contains
(
self
):
from
transaction.weakset
import
WeakSet
w
=
WeakSet
()
dummy
=
Dummy
()
w
.
add
(
dummy
)
...
...
@@ -29,6 +26,7 @@ class WeakSetTests(unittest.TestCase):
def
test_len
(
self
):
import
gc
from
transaction.weakset
import
WeakSet
w
=
WeakSet
()
d1
=
Dummy
()
d2
=
Dummy
()
...
...
@@ -40,6 +38,7 @@ class WeakSetTests(unittest.TestCase):
self
.
assertEqual
(
len
(
w
),
1
)
def
test_remove
(
self
):
from
transaction.weakset
import
WeakSet
w
=
WeakSet
()
dummy
=
Dummy
()
w
.
add
(
dummy
)
...
...
@@ -49,6 +48,7 @@ class WeakSetTests(unittest.TestCase):
def
test_as_weakref_list
(
self
):
import
gc
from
transaction.weakset
import
WeakSet
w
=
WeakSet
()
dummy
=
Dummy
()
dummy2
=
Dummy
()
...
...
@@ -64,6 +64,7 @@ class WeakSetTests(unittest.TestCase):
self
.
assertEqual
(
set
(
L
),
set
([
dummy
,
dummy2
]))
def
test_map
(
self
):
from
transaction.weakset
import
WeakSet
w
=
WeakSet
()
dummy
=
Dummy
()
dummy2
=
Dummy
()
...
...
@@ -78,9 +79,9 @@ class WeakSetTests(unittest.TestCase):
self
.
assertEqual
(
thing
.
poked
,
1
)
def
test_suite
()
:
return
unittest
.
makeSuite
(
WeakSetTests
)
class
Dummy
:
pass
if
__name__
==
'__main__'
:
unittest
.
main
()
def
test_suite
():
return
unittest
.
makeSuite
(
WeakSetTests
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment