From: Ed Bartosh <ed.bartosh@linux.intel.com>
To: openembedded-core@lists.openembedded.org
Subject: [wic][PATCH] wic tests: Add docstrings to test methods
Date: Thu, 23 Apr 2015 23:49:07 +0300 [thread overview]
Message-ID: <1429822147-5967-1-git-send-email-ed.bartosh@linux.intel.com> (raw)
Docstrings make nosetests output more clear:
Test wic create --help ... ok
Test wic --help ... ok
Test wic list --help ... ok
Test wic create directdisk providing all artifacts. ... ok
Test wic create directdisk --image-name core-image-minimal ... ok
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
---
scripts/tests/01_wic_test_help.py | 4 ++++
scripts/tests/02_wic_test_directdisk.py | 2 ++
2 files changed, 6 insertions(+)
diff --git a/scripts/tests/01_wic_test_help.py b/scripts/tests/01_wic_test_help.py
index a64cf2f..4aaa66f 100644
--- a/scripts/tests/01_wic_test_help.py
+++ b/scripts/tests/01_wic_test_help.py
@@ -28,13 +28,17 @@ class TestWicHelp(unittest.TestCase):
"""Test help output of wic (sub)commands"""
def setUp(self):
+ """This code is executed before each test method."""
self.main = imp.load_source("wic", "wic").main
def testhelp(self):
+ """Test wic --help"""
self.assertRaises(SystemExit, self.main, ['--help'])
def testcreatehelp(self):
+ """Test wic create --help"""
self.assertRaises(SystemExit, self.main, ['create', '--help'])
def testlisthelp(self):
+ """Test wic list --help"""
self.assertRaises(SystemExit, self.main, ['list', '--help'])
diff --git a/scripts/tests/02_wic_test_directdisk.py b/scripts/tests/02_wic_test_directdisk.py
index 9108621..6beff71 100644
--- a/scripts/tests/02_wic_test_directdisk.py
+++ b/scripts/tests/02_wic_test_directdisk.py
@@ -48,10 +48,12 @@ class TestWicDirectdisk(unittest.TestCase):
"directdisk-*.direct")))
def testbuild_image_name(self):
+ """Test wic create directdisk --image-name core-image-minimal"""
self._build(["create", "directdisk",
"--image-name", "core-image-minimal"])
def testbuild_artifacts(self):
+ """Test wic create directdisk providing all artifacts."""
self._build(["create", "directdisk",
"-b", "tmp/sysroots/qemux86/usr/share",
"-k", "tmp/deploy/images/qemux86",
--
2.1.4
reply other threads:[~2015-04-23 20:49 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1429822147-5967-1-git-send-email-ed.bartosh@linux.intel.com \
--to=ed.bartosh@linux.intel.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox