Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replacing assert_ with assertTrue to avoid deprecation warning #602

Merged
merged 1 commit into from
Jul 20, 2020
Merged
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 pyface/tasks/tests/test_editor_area_pane.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def test_create_editor(self):
"""
area = EditorAreaPane()
area.register_factory(Editor, lambda obj: isinstance(obj, int))
self.assert_(isinstance(area.create_editor(0), Editor))
self.assertTrue(isinstance(area.create_editor(0), Editor))

@unittest.skipIf(USING_WX, "EditorAreaPane is not implemented in WX")
def test_factories(self):
Expand Down
6 changes: 3 additions & 3 deletions pyface/tasks/tests/test_topological_sort.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,23 +81,23 @@ def test_topological_sort_1(self):
"""
pairs = [(1, 2), (3, 5), (4, 6), (1, 3), (1, 4), (1, 6), (2, 4)]
result, has_cycles = topological_sort(pairs)
self.assert_(not has_cycles)
self.assertTrue(not has_cycles)
self.assertEqual(result, [1, 2, 3, 4, 5, 6])

def test_topological_sort_2(self):
""" Does another basic topological sort work?
"""
pairs = [(1, 2), (1, 3), (2, 4), (3, 4), (5, 6), (4, 5)]
result, has_cycles = topological_sort(pairs)
self.assert_(not has_cycles)
self.assertTrue(not has_cycles)
self.assertEqual(result, [1, 2, 3, 4, 5, 6])

def test_topological_sort_3(self):
""" Does cycle detection work?
"""
pairs = [(1, 2), (2, 3), (3, 1)]
result, has_cycles = topological_sort(pairs)
self.assert_(has_cycles)
self.assertTrue(has_cycles)


if __name__ == "__main__":
Expand Down