{"issue":{"created_at":"2011-12-14T16:04:05Z","state":"closed","updated_at":"2011-12-14T16:04:06Z","user":{"gravatar_id":"86e49052bd9a5fb3eabfd7368b68bbb7","id":34519,"url":"https://api.github.com/users/jpellerin","avatar_url":"https://secure.gravatar.com/avatar/86e49052bd9a5fb3eabfd7368b68bbb7?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"jpellerin"},"comments":0,"body":"nose.config.Config.configure seems to intend that the initial\nself.testNames (from the c'tor) be used as the default test name for\nno-arguments command line invocation.  That a sensible feature (I was\nlooking for a feature just like that, in fact).  However, if that is the\nintent, it looks like it's broken, since slicing does not raise IndexError,\nso the except suite here (from .configure()) never happens and the default\n.testNames is always set empty in the no-commandline-args case:\n\n        try:\n            self.options, self.testNames = options, args[1:]\n        except IndexError:\n            self.options = options\n\n\n<b>What steps will reproduce the problem?</b>\n\nI don't have a test case written, but it should work to write a script\n(\"wrapper-script.py\") that does something like:\n\n    cfg_files = nose.config.all_config_files()\n    config = nose.config.Config(files=cfg_files,\n                                plugins=DefaultPluginManager())\n    config.testNames = ('/path/to/proejct',)\n    nose.core.main(config=config)\n\nAnd then put that wrapper script somewhere other than /path/to/project, and\nrun wrapper-script.py without arguments.\n\n\n<b>What is the expected output? What do you see instead?</b>\n\nGot: Running wrapper-script.py without args runs the tests from the current\nworking directory, not the tests in the directory listed in config.testNames\n\nExpected: runs all the tests from config.testNames\n\nAdding a \"raise IndexError\" immediately after the \"try:\" above makes the\nno-args test-wrapper.py show the expected behaviour\n\n\n<b>What version of the product are you using? On what operating system?</b>\n\nhttp://python-nose.googlecode.com/svn/branches/0.10.0-stable revision 315,\nUbuntu Linux.\n\n\n<b>Please provide any additional information below.</b>\n\n\n\nGoogle Code Info:\nIssue #: 92\nAuthor: j...@pobox.com\nCreated On: 2007-09-11T01:04:17.000Z\nClosed On: 2007-09-14T19:49:04.000Z","assignee":{"gravatar_id":"86e49052bd9a5fb3eabfd7368b68bbb7","id":34519,"url":"https://api.github.com/users/jpellerin","avatar_url":"https://secure.gravatar.com/avatar/86e49052bd9a5fb3eabfd7368b68bbb7?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"jpellerin"},"id":2553562,"labels":[],"number":218,"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"title":"No-arguments invocation does not use Config.testNames from c'tor","html_url":"https://github.com/nose-devs/nose/issues/218","closed_at":"2011-12-14T16:04:06Z","url":"https://api.github.com/repos/nose-devs/nose/issues/218","milestone":null},"action":"closed"}