From 3c358e74080e472ae6de2e5f594ef958b09587ac Mon Sep 17 00:00:00 2001 From: Samuel Gaist <samuel.gaist@idiap.ch> Date: Thu, 14 Mar 2019 17:30:26 +0100 Subject: [PATCH] [test][format_extends] Code cleanup --- beat/core/test/test_format_extends.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/beat/core/test/test_format_extends.py b/beat/core/test/test_format_extends.py index d71d5e26..cd7b9052 100644 --- a/beat/core/test/test_format_extends.py +++ b/beat/core/test/test_format_extends.py @@ -46,9 +46,9 @@ from . import prefix def test_invalid(): df = DataFormat(prefix, "user/extended_unknown/1") # not allowed - assert df.valid is False - assert df.errors[0].find("referred dataformat") != -1 - assert df.errors[0].find("user/unknown/1") != -1 + nose.tools.assert_false(df.valid) + nose.tools.assert_not_equal(df.errors[0].find("referred dataformat"), -1) + nose.tools.assert_not_equal(df.errors[0].find("user/unknown/1"), -1) # ---------------------------------------------------------- @@ -56,5 +56,7 @@ def test_invalid(): def test_name_clash(): df = DataFormat(prefix, "user/extended_name_clash/1") # not allowed - assert df.valid is False - assert df.errors[0].find("clashes with an attribute with the same") != -1 + nose.tools.assert_false(df.valid) + nose.tools.assert_not_equal( + df.errors[0].find("clashes with an attribute with the same"), -1 + ) -- GitLab