Commit 40062a11 authored by Martin Panter's avatar Martin Panter

Issue #25754: Allow test_rlcompleter to be run multiple times

parent 4f09806e
import unittest
from unittest.mock import patch
import builtins
import rlcompleter
......@@ -72,7 +73,7 @@ class TestRlcompleter(unittest.TestCase):
self.assertIn('CompleteMe.__name__', 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'),
['CompleteMe.me.me.spam'])
self.assertEqual(self.completer.attr_matches('egg.s'),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment