mirror of
git://git.yoctoproject.org/poky.git
synced 2025-07-19 12:59:02 +02:00
oeqa/core/case: add file exists assertion
Add assertFileExists() to simply tests that want to check that a file exists. (From OE-Core rev: b62e53a0cff2522fef3b89de875c9526a626d7dd) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
8e70eeb0b1
commit
6091ebc9c5
|
@ -5,6 +5,7 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
import base64
|
import base64
|
||||||
|
import os
|
||||||
import zlib
|
import zlib
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
|
@ -57,6 +58,13 @@ class OETestCase(unittest.TestCase):
|
||||||
d.tearDownDecorator()
|
d.tearDownDecorator()
|
||||||
self.tearDownMethod()
|
self.tearDownMethod()
|
||||||
|
|
||||||
|
def assertFileExists(self, filename, msg=None):
|
||||||
|
"""
|
||||||
|
Test that filename exists. If it does not, the test will fail.
|
||||||
|
"""
|
||||||
|
if not os.path.exists(filename):
|
||||||
|
self.fail(msg or "%s does not exist" % filename)
|
||||||
|
|
||||||
class OEPTestResultTestCase:
|
class OEPTestResultTestCase:
|
||||||
"""
|
"""
|
||||||
Mix-in class to provide functions to make interacting with extraresults for
|
Mix-in class to provide functions to make interacting with extraresults for
|
||||||
|
|
Loading…
Reference in New Issue
Block a user