Beispiel #1
0
 def test_args2dict(self):
     parser = main.setup_parser()
     args = parser.parse_args(test_args)
     argdict = main.args2dict(args)
     self.assertEqual(argdict["savedir"], "testdir")
     self.assertEqual(argdict["processes"], "10")
     self.assertEqual(argdict["subfolders"], "True")
     self.assertEqual(argdict["subreddits"], "test,testing")
Beispiel #2
0
 def test_parser_empty(self):
     parser = main.setup_parser()
     args = parser.parse_args([])
     argdict = main.args2dict(args)
     # Ensure that args2dict skips empty arguments
     self.assertEqual(len(argdict), 0)