Mercurial > hgrepos > Python > libs > ConfigMix
comparison tests/test.py @ 553:9d2bd411f5c5
Do not rstrip() the remaining variable name when parsing out filters from variable names
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Sun, 02 Jan 2022 20:43:24 +0100 |
| parents | 39e5d07d8dbc |
| children | 36d7aa000435 |
comparison
equal
deleted
inserted
replaced
| 552:39e5d07d8dbc | 553:9d2bd411f5c5 |
|---|---|
| 1904 self.assertEqual((u":", u"%x3a"), self.split_ns(u"%x3a:%x3a")) | 1904 self.assertEqual((u":", u"%x3a"), self.split_ns(u"%x3a:%x3a")) |
| 1905 | 1905 |
| 1906 def test_split_filters_empty(self): | 1906 def test_split_filters_empty(self): |
| 1907 self.assertEqual((u"", []), self.split_filters(u"")) | 1907 self.assertEqual((u"", []), self.split_filters(u"")) |
| 1908 | 1908 |
| 1909 def test_split_filters_varname_only(self): | 1909 def test_split_filters_varname_only_no_stripping(self): |
| 1910 self.assertEqual((u"varname ", []), self.split_filters(u"varname ")) | 1910 self.assertEqual((u" varname ", []), self.split_filters(u" varname ")) |
| 1911 | 1911 |
| 1912 def test_split_filters_single_stripping(self): | 1912 def test_split_filters_single_no_stripping(self): |
| 1913 self.assertEqual((u" the-varname", []), | 1913 self.assertEqual((u" the-varname ", []), |
| 1914 self.split_filters(u" the-varname | ")) | 1914 self.split_filters(u" the-varname | ")) |
| 1915 | 1915 |
| 1916 def test_split_filters_one(self): | 1916 def test_split_filters_one(self): |
| 1917 self.assertEqual((u"the-varname", [u"None"]), | 1917 self.assertEqual((u"the-varname", [u"None"]), |
| 1918 self.split_filters(u"the-varname |None")) | 1918 self.split_filters(u"the-varname|None")) |
| 1919 | 1919 |
| 1920 def test_split_filters_many(self): | 1920 def test_split_filters_many(self): |
| 1921 self.assertEqual((u"the-varname", [u"Empty", u"None"]), | 1921 self.assertEqual((u"the-varname", [u"Empty", u"None"]), |
| 1922 self.split_filters(u"the-varname |Empty|None")) | 1922 self.split_filters(u"the-varname|Empty|None")) |
| 1923 | 1923 |
| 1924 | 1924 |
| 1925 class T09Parser(_TParserMixin, unittest.TestCase): | 1925 class T09Parser(_TParserMixin, unittest.TestCase): |
| 1926 | 1926 |
| 1927 def setUp(self): | 1927 def setUp(self): |
