def test_force_argument(self): argv = self._make_argv_with() args = entry.parse(argv) self.assertFalse(args.force) argv = self._make_argv_with('-f') args = entry.parse(argv) self.assertTrue(args.force) argv = self._make_argv_with('--force') args = entry.parse(argv) self.assertTrue(args.force)
def test_timing_argument(self): argv = self._make_argv_with() args = entry.parse(argv) self.assertFalse(args.timing) argv = self._make_argv_with('-t') args = entry.parse(argv) self.assertTrue(args.timing) argv = self._make_argv_with('--timing') args = entry.parse(argv) self.assertTrue(args.timing)
def test_verbose_argument(self): argv = self._make_argv_with() args = entry.parse(argv) self.assertFalse(args.verbose) argv = self._make_argv_with('-v') args = entry.parse(argv) self.assertTrue(args.verbose) argv = self._make_argv_with('--verbose') args = entry.parse(argv) self.assertTrue(args.verbose)
def test_debug_argument(self): argv = self._make_argv_with() args = entry.parse(argv) self.assertFalse(args.debug) argv = self._make_argv_with('-d') args = entry.parse(argv) self.assertTrue(args.debug) argv = self._make_argv_with('--debug') args = entry.parse(argv) self.assertTrue(args.debug)
def test_site_argument_is_normalized(self): """Test that trailing path separator is removed so that a site is consistently handled.""" site = 'fake_site' + os.sep argv = self._make_argv_with() argv.append(site) args = entry.parse(argv) self.assertEqual('fake_site', args.site)
def test_outdir_argument(self): outdir = 'fake_outdir' argv = self._make_argv_with() argv.extend(['fake_site', outdir]) args = entry.parse(argv) self.assertEqual(outdir, args.outdir)
def test_site_argument(self): site = 'fake_site' argv = self._make_argv_with() argv.append(site) args = entry.parse(argv) self.assertEqual(site, args.site)