Changeset 2117212 in rattail


Ignore:
Timestamp:
06/16/20 16:40:36 (2 months ago)
Author:
Lance Edgar <lance@…>
Branches:
master
Children:
4b03957
Parents:
ebd65a8
Message:

Add a test for config.parse_list() with single quotes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • rattail/tests/test_config.py

    rebd65a8 r2117212  
    9090        self.assertEqual(value[2], u'baz')
    9191
     92    def test_multiple_values_separated_by_whitespace_and_commas_with_single_quotes(self):
     93        value = config.parse_list("""
     94        foo
     95        'C:\\some path\\with spaces\\and, a comma',
     96        baz
     97        """)
     98        self.assertEqual(len(value), 3)
     99        self.assertEqual(value[0], 'foo')
     100        self.assertEqual(value[1], 'C:\\some path\\with spaces\\and, a comma')
     101        self.assertEqual(value[2], 'baz')
     102
    92103
    93104class TestRattailConfig(unittest.TestCase):
Note: See TracChangeset for help on using the changeset viewer.