Exemple #1
0
    def test_defaults(self):
        sys.argv.append("bam.h")

        (options, args, err) = uh.handle_cmdline()

        self.assertFalse(err)
        self.assertFalse(options.do_rename)
        self.assertTrue(args.header_filename == "bam.h")
        self.assertTrue(args.searchdir == ".")
Exemple #2
0
    def test_toomanyargs(self):
        sys.argv.append("bar.h")
        sys.argv.append("/")
        sys.argv.append("aaa")

        (options, args, err) = uh.handle_cmdline()

        self.assertTrue(err)
        self.assertTrue(err == uh.BAD_ARGS)
Exemple #3
0
    def test_toofewargs(self):
        (options, args, err) = uh.handle_cmdline()

        self.assertTrue(err)
        self.assertTrue(err == uh.BAD_ARGS)