def testScalarWithNoneValueMerging(self):
    page0 = self.pages[0]
    v0 = scalar.ScalarValue(
        page0, 'x', 'unit', 1, improvement_direction=improvement_direction.DOWN)
    v1 = scalar.ScalarValue(page0, 'x', 'unit', None, none_value_reason='n',
                            improvement_direction=improvement_direction.DOWN)
    self.assertTrue(v1.IsMergableWith(v0))

    vM = scalar.ScalarValue.MergeLikeValuesFromSamePage([v0, v1])
    self.assertEquals(None, vM.values)
    expected_none_value_reason = (
        'Merging values containing a None value results in a None value. '
        'None values: [ScalarValue(http://www.bar.com/, x, unit, None, '
        'important=True, description=None, tir_label=None, '
        'improvement_direction=down, grouping_keys={}]')
    self.assertEquals(expected_none_value_reason, vM.none_value_reason)