call site 0 for compat.optparse.make_option.check_value
test/rsession/testing/test_lsession.py - line 212
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
   def test_module_raising(self):
       tmpdir = tmp
       tmpdir.ensure("sub5", "__init__.py")
       tmpdir.ensure("sub5", "test_some.py").write(py.code.Source("""
               1/0
           """))
       tmpdir.ensure("sub5", "test_other.py").write(py.code.Source("""
               import py
               py.test.skip("reason")
           """))
           
       args = [str(tmpdir.join("sub5"))]
->     config = py.test.config._reparse(args)
       lsession = LSession(config)
       allevents = []
       lsession.main(reporter=allevents.append, runner=box_runner)
       testevents = [x for x in allevents 
                       if isinstance(x, repevent.ReceivedItemOutcome)]
       assert len(testevents) == 0
       failedtryiter = [x for x in allevents 
                       if isinstance(x, repevent.FailedTryiter)]
       assert len(failedtryiter) == 1
       skippedtryiter = [x for x in allevents 
                       if isinstance(x, repevent.SkippedTryiter)]
       assert len(skippedtryiter) == 1
test/config.py - line 187
180
181
182
183
184
185
186
187
188
189
190
   def _reparse(self, args):
       """ this is used from tests that want to re-invoke parse(). """
       #assert args # XXX should not be empty
       global config_per_process
       oldconfig = py.test.config
       try:
           config_per_process = py.test.config = Config()
->         config_per_process.parse(args) 
           return config_per_process
       finally: 
           config_per_process = py.test.config = oldconfig 
test/config.py - line 48
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
   def parse(self, args): 
       """ parse cmdline arguments into this config object. 
               Note that this can only be called once per testing process. 
           """ 
       assert not self._initialized, (
               "can only parse cmdline args once per Config object")
       self._initialized = True
       adddefaultoptions(self)
       self._conftest.setinitial(args) 
       args = [str(x) for x in args]
->     cmdlineoption, args = self._parser.parse_args(args) 
       self.option.__dict__.update(vars(cmdlineoption))
       if not args:
           args.append(py.std.os.getcwd())
       self.topdir = gettopdir(args)
       self.args = args 
compat/optparse.py - line 1261
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
   def parse_args(self, args=None, values=None):
       """
           parse_args(args : [string] = sys.argv[1:],
                      values : Values = None)
           -> (values : Values, args : [string])
   
           Parse the command-line options found in 'args' (default:
           sys.argv[1:]).  Any errors result in a call to 'error()', which
           by default prints the usage message to stderr and calls
           sys.exit() with an error message.  On success returns a pair
           (values, args) where 'values' is an Values instance (with all
           your option values) and 'args' is the list of arguments left
           over after parsing options.
           """
       rargs = self._get_args(args)
       if values is None:
->         values = self.get_default_values()
   
       # Store the halves of the argument list as attributes for the
       # convenience of callbacks:
       #   rargs
       #     the rest of the command-line (the "r" stands for
       #     "remaining" or "right-hand")
       #   largs
       #     the leftover arguments -- ie. what's left after removing
       #     options and their arguments (the "l" stands for "leftover"
       #     or "left-hand")
       self.rargs = rargs
       self.largs = largs = []
       self.values = values
   
       try:
           stop = self._process_args(largs, rargs, values)
       except (BadOptionError, OptionValueError), err:
           self.error(err.msg)
   
       args = largs + rargs
       return self.check_values(values, args)
compat/optparse.py - line 1206
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
   def get_default_values(self):
       if not self.process_default_values:
           # Old, pre-Optik 1.5 behaviour.
           return Values(self.defaults)
   
       defaults = self.defaults.copy()
       for option in self._get_all_options():
           default = defaults.get(option.dest)
           if isinstance(default, basestring):
               opt_str = option.get_opt_string()
->             defaults[option.dest] = option.check_value(opt_str, default)
   
       return Values(defaults)