Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Lib/idlelib/idle_test/template.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def tearDownClass(cls):
del cls.root

def test_init(self):
self.assertTrue(True)
self.assertTrue(self)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a template file. It is not executed.



if __name__ == '__main__':
Expand Down
4 changes: 2 additions & 2 deletions Lib/idlelib/idle_test/test_autocomplete.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,8 @@ def test_fetch_completions(self):
# Test attributes
s, b = acp.fetch_completions('', ac.ATTRS)
self.assertLess(len(small), len(large))
self.assertTrue(all(filter(lambda x: x.startswith('_'), s)))
self.assertTrue(any(filter(lambda x: x.startswith('_'), b)))
self.assertFalse(any(x.startswith('_') for x in s))
self.assertTrue(any(x.startswith('_') for x in b))
Comment on lines +241 to +242

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't it the same?


# Test smalll should respect to __all__.
with patch.dict('__main__.__dict__', {'__all__': ['a', 'b']}):
Expand Down
14 changes: 7 additions & 7 deletions Lib/idlelib/idle_test/test_configdialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@ def tearDownModule():
root = dialog = None


class ConfigDialogTest(unittest.TestCase):

def test_deactivate_current_config(self):
pass

def activate_config_changes(self):
pass
##class ConfigDialogTest(unittest.TestCase):
##
## def test_deactivate_current_config(self):
## pass
##
## def activate_config_changes(self):
## pass


class ButtonTest(unittest.TestCase):
Expand Down
48 changes: 24 additions & 24 deletions Lib/idlelib/idle_test/test_editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,30 +211,30 @@ def test_searcher(self):
self.assertEqual(actual_pair, expected_pair)


class RMenuTest(unittest.TestCase):

@classmethod
def setUpClass(cls):
requires('gui')
cls.root = Tk()
cls.root.withdraw()
cls.window = Editor(root=cls.root)

@classmethod
def tearDownClass(cls):
cls.window._close()
del cls.window
cls.root.update_idletasks()
for id in cls.root.after_info():
cls.root.after_cancel(id)
cls.root.destroy()
del cls.root

class DummyRMenu:
def tk_popup(x, y): pass

def test_rclick(self):
pass
##class RMenuTest(unittest.TestCase):

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will be a pain to uncomment it all beck when real tests will be added. If you want to make the skip more explicit, you can use @unittest.skip().

##
## @classmethod
## def setUpClass(cls):
## requires('gui')
## cls.root = Tk()
## cls.root.withdraw()
## cls.window = Editor(root=cls.root)
##
## @classmethod
## def tearDownClass(cls):
## cls.window._close()
## del cls.window
## cls.root.update_idletasks()
## for id in cls.root.after_info():
## cls.root.after_cancel(id)
## cls.root.destroy()
## del cls.root
##
## class DummyRMenu:
## def tk_popup(x, y): pass
##
## def test_rclick(self):
## pass # Comment out because cannot fail; gh-155648.


if __name__ == '__main__':
Expand Down
Loading