Beispiel #1
0
 def test_parsing_comment_or_empty(self):
     input_data = [
         '',
         '  ',
         '# some comment',
         '   # some other comment'
     ]
     self.assertEqual(millipede.parse_rcfile(input_data), {})
Beispiel #2
0
 def test_boolean_false(self):
     input_data = [
         'reverse false',
         'opposite False'
     ]
     self.assertEqual(millipede.parse_rcfile(input_data), {
         'reverse': False,
         'opposite': False
     })
Beispiel #3
0
 def test_boolean_true(self):
     input_data = [
         'reverse true',
         'opposite True'
     ]
     self.assertEqual(millipede.parse_rcfile(input_data), {
         'reverse': True,
         'opposite': True
     })
Beispiel #4
0
 def test_parsing(self):
     input_data = [
         'size 10',
         'comment Here I test'
     ]
     self.assertEqual(millipede.parse_rcfile(input_data), {
         'size': 10,
         'comment': 'Here I test',
     })
Beispiel #5
0
 def test_wrong_key(self):
     input_data = [
         'some-wrong-key millipede'
     ]
     self.assertEqual(millipede.parse_rcfile(input_data), {})