Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
40062a11
Commit
40062a11
authored
Nov 28, 2015
by
Martin Panter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #25754: Allow test_rlcompleter to be run multiple times
parent
4f09806e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
Lib/test/test_rlcompleter.py
Lib/test/test_rlcompleter.py
+7
-6
No files found.
Lib/test/test_rlcompleter.py
View file @
40062a11
import
unittest
import
unittest
from
unittest.mock
import
patch
import
builtins
import
builtins
import
rlcompleter
import
rlcompleter
...
@@ -72,12 +73,12 @@ class TestRlcompleter(unittest.TestCase):
...
@@ -72,12 +73,12 @@ class TestRlcompleter(unittest.TestCase):
self
.
assertIn
(
'CompleteMe.__name__'
,
matches
)
self
.
assertIn
(
'CompleteMe.__name__'
,
matches
)
self
.
assertIn
(
'CompleteMe.__new__('
,
matches
)
self
.
assertIn
(
'CompleteMe.__new__('
,
matches
)
CompleteMe
.
me
=
CompleteMe
with
patch
.
object
(
CompleteMe
,
"me"
,
CompleteMe
,
create
=
True
):
self
.
assertEqual
(
self
.
completer
.
attr_matches
(
'CompleteMe.me.me.sp'
),
self
.
assertEqual
(
self
.
completer
.
attr_matches
(
'CompleteMe.me.me.sp'
),
[
'CompleteMe.me.me.spam'
])
[
'CompleteMe.me.me.spam'
])
self
.
assertEqual
(
self
.
completer
.
attr_matches
(
'egg.s'
),
self
.
assertEqual
(
self
.
completer
.
attr_matches
(
'egg.s'
),
[
'egg.{}('
.
format
(
x
)
for
x
in
dir
(
str
)
[
'egg.{}('
.
format
(
x
)
for
x
in
dir
(
str
)
if
x
.
startswith
(
's'
)])
if
x
.
startswith
(
's'
)])
def
test_excessive_getattr
(
self
):
def
test_excessive_getattr
(
self
):
# Ensure getattr() is invoked no more than once per attribute
# Ensure getattr() is invoked no more than once per attribute
...
...
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