• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

neithere / argh / 165
93%

Build:
DEFAULT BRANCH: master
Ran 06 Feb 2019 10:02PM UTC
Jobs 4
Files 12
Run time 30s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
165

Pull #134

travis-ci

web-flow
Fix bug with skip_unknown_args=True

Passing `skip_unknown_args=True` to the parser only ever showed the
usage message.

The problem is that `parser.parse_known_args()`
(`ArgumentParser.parse_known_args`) returns a tuple
`(namespace, remainder)` instead of just a namespace object like
`parser.parse_args`. Once you pass this to
`_get_function_from_namespace_obj` it gets confused.

The unit test was expecting to only ever show the usage message when
skipping unknown args.

The remaining unknown args are stored on the namespace as `_unkown_args`,
so it's at least accessible (if we use `@expects_obj`)

```python
import argh
parser = argh.ArghParser()

@argh.arg('a')
@argh.expects_obj
def foo(args):
    print 'foo args', args

parser.add_commands([foo, bar])
parser.dispatch(skip_unknown_args=True)
```
Pull Request #134: Fix bug with skip_unknown_args=True

4 of 4 new or added lines in 1 file covered. (100.0%)

461 of 495 relevant lines covered (93.13%)

3.57 hits per line

Jobs
ID Job ID Ran Files Coverage
1 165.1 06 Feb 2019 10:02PM UTC 0
90.1
Travis Job 165.1
2 165.2 06 Feb 2019 10:02PM UTC 0
88.48
Travis Job 165.2
3 165.3 06 Feb 2019 10:02PM UTC 0
88.69
Travis Job 165.3
4 165.4 06 Feb 2019 10:03PM UTC 0
90.1
Travis Job 165.4
Source Files on build 165
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #165
  • Pull Request #134
  • PR Base - master (#158)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc