def test_other_values_are_used(self): attr = self._mock('valid foreground', 'valid background') expected = attr.foreground, attr.background actual = utils.resolve_att(attr, self.fallback) self.assertTupleEqual(actual, expected)
def test_empty_string_in_background_picks_up_background_from_fallback(self): attr = self._mock('valid foreground', '') expected = (attr.foreground, self.fallback.background) actual = utils.resolve_att(attr, self.fallback) self.assertTupleEqual(actual, expected)
def test_default_in_foreground_picks_up_foreground_from_fallback(self): attr = self._mock('default', 'valid background') expected = self.fallback.foreground, attr.background actual = utils.resolve_att(attr, self.fallback) self.assertTupleEqual(actual, expected)
def test_passing_none_returns_fallback(self): actual = utils.resolve_att(None, self.fallback) self.assertEqual(actual, self.fallback)