tests,stdlib,python: Add tests for base 10 to 2 SI unit check
**Note**: Erin needs to complete the commit by expanding this test to properly test the behavior of this change. To run the pyunit tests: ```sh scons build/ALL/gem5.opt -j`nproc` ./build/ALL/gem5.opt tests/run_pyunit.py ``` Change-Id: I8cea0fe8b088e03e84072a000444953768bc3151
This commit is contained in:
@@ -277,3 +277,11 @@ class ConvertTestSuite(unittest.TestCase):
|
||||
self.assertRaises(ValueError, conv, "-1K")
|
||||
|
||||
self.assertEqual(conv("32F"), 273.15)
|
||||
|
||||
def test_base_10_to_2(self):
|
||||
conv = convert._base_10_to_2
|
||||
|
||||
self.assertEqual(conv("1k"), "1Ki")
|
||||
self.assertIsNone(conv("1Ki"))
|
||||
|
||||
# Leaving the rest of this test for Erin to finish.
|
||||
|
||||
Reference in New Issue
Block a user