aboutsummaryrefslogtreecommitdiff
path: root/linaro_image_tools/hwpack
diff options
context:
space:
mode:
authorMilo Casagrande <milo@ubuntu.com>2012-12-27 11:29:42 +0100
committerMilo Casagrande <milo@ubuntu.com>2012-12-27 11:29:42 +0100
commit91897e5c99ab9a49f72caa749db19c7bfbe4d824 (patch)
tree9cf0989b87d9d3ad3c7c35369c2a1a0acce90887 /linaro_image_tools/hwpack
parent6a5c8131f0105fb3d3da497368db70263c519904 (diff)
Added comments.
Diffstat (limited to 'linaro_image_tools/hwpack')
-rw-r--r--linaro_image_tools/hwpack/tests/test_config_v3.py2
-rw-r--r--linaro_image_tools/hwpack/tests/test_hwpack_converter.py6
2 files changed, 7 insertions, 1 deletions
diff --git a/linaro_image_tools/hwpack/tests/test_config_v3.py b/linaro_image_tools/hwpack/tests/test_config_v3.py
index 0d04849..27eb952 100644
--- a/linaro_image_tools/hwpack/tests/test_config_v3.py
+++ b/linaro_image_tools/hwpack/tests/test_config_v3.py
@@ -348,6 +348,8 @@ class ConfigTests(TestCase):
config._validate_serial_tty)
def test_validate_mmc_id_wrong(self):
+ # The mmc_id value, if coming from a yaml file, has to be quoted.
+ # Make sure the test does not accept a valid-unquoted value.
config = self.get_config(self.valid_complete_v3 +
"mmc_id: 1:1\n")
self.assertRaises(HwpackConfigError, config._validate_mmc_id)
diff --git a/linaro_image_tools/hwpack/tests/test_hwpack_converter.py b/linaro_image_tools/hwpack/tests/test_hwpack_converter.py
index 9028c76..4f83994 100644
--- a/linaro_image_tools/hwpack/tests/test_hwpack_converter.py
+++ b/linaro_image_tools/hwpack/tests/test_hwpack_converter.py
@@ -168,7 +168,11 @@ class HwpackConverterTests(TestCaseWithFixtures):
self.assertEqual(out_format, str(converter))
def test_mmc_id(self):
- """Test correct handling of mmc_id field."""
+ """Test correct handling of mmc_id field.
+
+ The mmc_id field has to be quoted coming out from the converter
+ otherwise when reading the yaml file the value is read as a number,
+ not a string."""
ini_format = ("[hwpack]\nformat=2.0\nmmc_id=1:1")
out_format = ("format: '3.0'\nmmc_id: '1:1'\n")
input_file = self.useFixture(CreateTempFileFixture(ini_format)).\