Commit fa070417 authored by Samuel GAIST's avatar Samuel GAIST
Browse files

[test][hash] Code cleanup

parent 66f07e52
......@@ -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)
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