diff --git a/beat/core/test/test_hash.py b/beat/core/test/test_hash.py index 2723aef2cbaa6aa26f7e6445a6e5b9cc4ea88f10..53853cb35dd35f32898a1b5453617c7ff24808ba 100644 --- a/beat/core/test/test_hash.py +++ b/beat/core/test/test_hash.py @@ -56,9 +56,9 @@ def test_block_output_hash(): }, "some_output", ) - assert h is not None - assert isinstance(h, str) - assert len(h) > 0 + nose.tools.assert_is_not_none(h) + nose.tools.assert_true(isinstance(h, str)) + nose.tools.assert_true(len(h) > 0) # ---------------------------------------------------------- @@ -130,7 +130,7 @@ def test_different_block_output_hash(): "output2", ) - assert h1 != h2, "%r != %r" % (h1, h2) + nose.tools.assert_not_equal(h1, h2) # ---------------------------------------------------------- @@ -151,9 +151,9 @@ def test_analyzer_hash(): }, ) - assert h is not None - assert isinstance(h, str) - assert len(h) > 0 + nose.tools.assert_is_not_none(h) + nose.tools.assert_true(isinstance(h, str)) + nose.tools.assert_true(len(h) > 0) # ---------------------------------------------------------- @@ -221,7 +221,7 @@ def test_different_analyzer_hash(): }, ) - assert h1 != h2, "%r != %r" % (h1, h2) + nose.tools.assert_not_equal(h1, h2) # ---------------------------------------------------------- @@ -232,13 +232,13 @@ def test_path_from_hash(): h = hash.hashDataset("some_database/1", "some_protocol", " some_set") path = hash.toPath(h) - assert path is not None - assert isinstance(path, str) - assert len(path) > 0 + nose.tools.assert_is_not_none(path) + nose.tools.assert_true(isinstance(path, str)) + nose.tools.assert_true(len(path) > 0) parts = path.split("/") - assert len(parts) > 1 + nose.tools.assert_true(len(parts) > 1) for folder in parts[:-1]: nose.tools.eq_(len(folder), 2)