コード例 #1
0
    def getTestingArgs(dataDirRequired=False, outputDirRequired=False):

      parser = drcargs.DRCArgParser().getParser()
      parser.add_argument('--testing', action='store_true', help='enable testing mode')
      parser.add_argument('--data-dir', type=str, help='testing data directory', required=dataDirRequired)
      parser.add_argument('--output-dir', type=str, help='output directory for writing test output', required=outputDirRequired)
      parser.add_argument('--interactive', action='store_true', help='enable interactive testing mode')

      args, unknown = parser.parse_known_args()
      return args
コード例 #2
0
ファイル: consoleapp.py プロジェクト: xijunke/director-1
    def getTestingArgs(dataDirRequired=False, outputDirRequired=False):

        parser = drcargs.DRCArgParser().getParser()
        parser.add_argument("--testing",
                            action="store_true",
                            help="enable testing mode")
        parser.add_argument(
            "--data-dir",
            type=str,
            help="testing data directory",
            required=dataDirRequired,
        )
        parser.add_argument(
            "--output-dir",
            type=str,
            help="output directory for writing test output",
            required=outputDirRequired,
        )
        parser.add_argument("--interactive",
                            action="store_true",
                            help="enable interactive testing mode")

        args, unknown = parser.parse_known_args()
        return args