comparison tests/test.py @ 708:e692216f8756

Allow also "," characters to act as a separator within a filter-chain. The first filter is introduced by a "|", optional other ones may be introduced by a "|" or a ",".
author Franz Glasner <f.glasner@feldmann-mg.com>
date Tue, 15 Aug 2023 11:14:51 +0200
parents 0485a033c95d
children ff0de14493f1
comparison
equal deleted inserted replaced
707:10fbc23b4dba 708:e692216f8756
2227 2227
2228 def test_split_filters_many(self): 2228 def test_split_filters_many(self):
2229 self.assertEqual((u"the-varname", [u"Empty", u"None"]), 2229 self.assertEqual((u"the-varname", [u"Empty", u"None"]),
2230 self.split_filters(u"the-varname|Empty|None", 1)) 2230 self.split_filters(u"the-varname|Empty|None", 1))
2231 2231
2232 def test_split_filters_many_alt(self):
2233 self.assertEqual((u"the-varname", [u"Empty", u"None"]),
2234 self.split_filters(u"the-varname|Empty,None", 1))
2235
2232 def test_None_filter_single(self): 2236 def test_None_filter_single(self):
2233 cfg = configmix.load() 2237 cfg = configmix.load()
2234 x = getattr(cfg, self.interpolate_meth)(u"{{non-existing|None}}") 2238 x = getattr(cfg, self.interpolate_meth)(u"{{non-existing|None}}")
2235 self.assertIsNone(x) 2239 self.assertIsNone(x)
2236 # caching should have no effect 2240 # caching should have no effect