示例#1
0
    def test_no_backup(self):
        args = MockArgParse()
        args.no_backup = True

        result = subst._parse_args__get_ext(args)

        self.assertEqual(result, '')
示例#2
0
    def test_given_ext_with_dot(self):
        args = MockArgParse()
        args.ext = '.jpg'

        result = subst._parse_args__get_ext(args)

        self.assertEqual(result, '.' + args.ext)
示例#3
0
    def test_simple(self):
        args = MockArgParse()

        result = subst._parse_args__get_ext(args)

        self.assertEqual(result, '.' + subst.DEFAULT_BACKUP_EXTENSION)