]> code.ossystems Code Review - openembedded-core.git/commit
selftest/devtool: replace file assertTrue/False with assertExists/NotExists
authorYeoh Ee Peng <ee.peng.yeoh@intel.com>
Wed, 14 Jun 2017 20:01:12 +0000 (13:01 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 23 Jun 2017 10:43:37 +0000 (11:43 +0100)
commit08b0702492536d41d3cf2c9c05d1fab36d32a566
treeff92ca4723a15ea85cf2cfcb793401814338057a
parentf7d105a8e63466afdf226f2139e06f3c0230e2f9
selftest/devtool: replace file assertTrue/False with assertExists/NotExists

Current osselftest print confusing assertion message when using
self.assertTrue(os.path.exists(filepath)) to test file path,
example of confusing assertion message:
AssertionError: False is not true

Replce assertTrue/assertFalse with assertExists/assertNotExists to test
file path, this will improve assertion message and simplify coding,
self.assertExists(filepath) will print below
AssertionError: <filepath> does not exist

[YOCTO #11356]

Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/lib/oeqa/selftest/cases/devtool.py