← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1056420] Re: nosetest options cause no such option errors

 

** Changed in: glance/grizzly
   Importance: Undecided => Low

** Changed in: glance/grizzly
       Status: New => Fix Released

** Changed in: glance/grizzly
    Milestone: None => 2013.1

** Changed in: glance/grizzly
     Assignee: (unassigned) => Mark Washenberger (markwash)

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Glance.
https://bugs.launchpad.net/bugs/1056420

Title:
  nosetest options cause no such option errors

Status in OpenStack Image Registry and Delivery Service (Glance):
  Fix Released
Status in Glance folsom series:
  Fix Released
Status in Glance grizzly series:
  Fix Released
Status in “glance” package in Ubuntu:
  Fix Released
Status in “glance” source package in Quantal:
  Fix Released

Bug description:
  When trying to use nose options, there are a few place in the test
  code where openstack common config is failing because its trying to
  parse sys.argv. For example:

  $ eatmydata ./run_tests.sh
  glance/tests/unit/v2/test_images_resource.py -x

  TestImagesController
      test_create                                                  Usage: nosetests [options]

  nosetests: error: no such option: -x
  ERROR  0.00

  ======================================================================
  ERROR: test_create (glance.tests.unit.v2.test_images_resource.TestImagesController)
  ----------------------------------------------------------------------
  Traceback (most recent call last):
    File "/home/markwash/devel/glance/glance/tests/unit/v2/test_images_resource.py", line 77, in setUp
      super(TestImagesController, self).setUp()
    File "/home/markwash/devel/glance/glance/tests/utils.py", line 60, in setUp
      config.parse_args()
    File "/home/markwash/devel/glance/glance/common/config.py", line 73, in parse_args
      default_config_files=default_config_files)
    File "/home/markwash/devel/glance/glance/openstack/common/cfg.py", line 1024, in __call__
      self._cli_values, leftovers = self._parse_cli_opts(args)
    File "/home/markwash/devel/glance/glance/openstack/common/cfg.py", line 1529, in _parse_cli_opts
      values, leftovers = self._oparser.parse_args(args)
    File "/usr/lib/python2.7/optparse.py", line 1401, in parse_args
      self.error(str(err))
    File "/usr/lib/python2.7/optparse.py", line 1583, in error
      self.exit(2, "%s: error: %s\n" % (self.get_prog_name(), msg))
    File "/usr/lib/python2.7/optparse.py", line 1573, in exit
      sys.exit(status)
  SystemExit: 2

To manage notifications about this bug go to:
https://bugs.launchpad.net/glance/+bug/1056420/+subscriptions