Skip to content

Commit

Permalink
replacing assert_ with assertTrue to avoid deprecation warning
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronayres35 committed Jul 17, 2020
1 parent 0f3202b commit d6c387c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
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

0 comments on commit d6c387c

Please sign in to comment.