[oe-commits] Ed Bartosh : wic tests: Add docstrings to test methods

git at git.openembedded.org git at git.openembedded.org
Fri May 1 16:09:40 UTC 2015


Module: openembedded-core.git
Branch: master-next
Commit: ca3404ae72b530a656f1904fe376deac24a13fcd
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=ca3404ae72b530a656f1904fe376deac24a13fcd

Author: Ed Bartosh <ed.bartosh at linux.intel.com>
Date:   Thu Apr 23 23:49:07 2015 +0300

wic tests: Add docstrings to test methods

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 at linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>

---

 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",



More information about the Openembedded-commits mailing list