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

tarantool / tarantool / 19461
83%
master: 88%

Build:
Build:
LAST BUILD BRANCH: backport/release/3.8/12921
DEFAULT BRANCH: master
Ran 15 Nov 2019 03:44AM UTC
Jobs 1
Files 306
Run time 34s
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
19461

push

travis-ci

Totktonada
app/argparse: expect no value for a boolean option

Before commit 03f85d4cf ('app: fix
boolean handling in argparse module') the module does not expect a value
after a 'boolean' argument. However there was the problem: a 'boolean'
argument can be passed only at end of an argument list, otherwise it
wrongly consumes a next argument and gives a confusing error message.

The mentioned commit fixes this behaviour in the following way: it still
allows to pass a 'boolean' argument at end of the list w/o a value, but
requires a value ('true', 'false', '1', '0') if a 'boolean' argument is
not at the end to be provided using {'--foo=true'} or {'--foo', 'true'}
syntax.

Here this behaviour is changed: a 'boolean' argument does not assume an
explicitly passed value despite its position in an argument list. If a
'boolean' argument appears in the list, then argparse.parse() returns
`true` for its value (a list of `true` values in case of 'boolean+'
argument), otherwise it will not be added to the result.

This change also makes the behaviour of long (--foo) and short (-f)
'boolean' options consistent.

The motivation of the change is simple: it is easier and more natural to
type, say, `tarantoolctl cat --show-system 00000000000000000000.snap`
then `tarantoolctl cat --show-system true 00000000000000000000.snap`.

This commit adds several new test cases, but it does not mean that we
guarantee that the module behaviour will not be changed around some
corner cases, say, handling of 'boolean+' arguments. This is internal
module.

Follows up #4076.
Reviewed-by: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>

(cherry picked from commit e47f2c916)

41689 of 50547 relevant lines covered (82.48%)

814456.28 hits per line

Jobs
ID Job ID Ran Files Coverage
4 19461.4 (TARGET=coverage) 15 Nov 2019 03:44AM UTC 0
82.48
Travis Job 19461.4
Source Files on build 19461
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #19461
  • 939def45 on github
  • Prev Build on 1.10 (#19415)
  • Next Build on 1.10 (#19534)
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

© 2026 Coveralls, Inc