update ptweens with config_vars argument
- replace self.args with self.args.config_uri
| | |
| | | default=None, |
| | | help='The URI to the configuration file.') |
| | | |
| | | parser.add_argument( |
| | | 'config_vars', |
| | | nargs='*', |
| | | default=(), |
| | | help='Arbitrary options to override those in the [app:main] section ' |
| | | 'of the configuration file.', |
| | | ) |
| | | |
| | | stdout = sys.stdout |
| | | bootstrap = (bootstrap,) # testing |
| | | |
| | |
| | | self.out(fmt % ('-', MAIN)) |
| | | |
| | | def run(self): |
| | | if not self.args: |
| | | if not self.args.config_uri: |
| | | self.out('Requires a config file argument') |
| | | return 2 |
| | | config_uri = self.args[0] |
| | | env = self.bootstrap[0](config_uri, options=parse_vars(self.args[1:])) |
| | | config_uri = self.args.config_uri |
| | | env = self.bootstrap[0](config_uri, options=parse_vars(self.args.config_vars)) |
| | | registry = env['registry'] |
| | | tweens = self._get_tweens(registry) |
| | | if tweens is not None: |
| | |
| | | def _makeOne(self): |
| | | cmd = self._getTargetClass()([]) |
| | | cmd.bootstrap = (dummy.DummyBootstrap(),) |
| | | cmd.args = ('/foo/bar/myapp.ini#myapp',) |
| | | cmd.args.config_uri = '/foo/bar/myapp.ini#myapp' |
| | | return cmd |
| | | |
| | | def test_command_no_tweens(self): |