From: Sergey Bronnikov <sergeyb@tarantool.org>
To: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
Cc: o.piskunov@tarantool.org, Sergey Bronnikov <estetus@gmail.com>,
tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH v2 2/6] Fix luacheck warnings in test/
Date: Tue, 14 Apr 2020 10:49:53 +0300 [thread overview]
Message-ID: <20200414074953.GA51517@pony.bronevichok.ru> (raw)
In-Reply-To: <2a256771-68aa-df00-6522-eb99e91cf1ee@tarantool.org>
On 18:54 Sat 11 Apr , Vladislav Shpilevoy wrote:
> Hi! Thanks for the patch!
>
> > diff --git a/test/box/iproto_stress.result b/test/box/iproto_stress.result
> > index 7149d6c52..3b5b0a031 100644
> > --- a/test/box/iproto_stress.result
> > +++ b/test/box/iproto_stress.result
> > @@ -76,13 +76,13 @@ test_run:wait_cond(function() return n_workers == 0 end, 60)
> > ---
> > - true
> > ...
> > -n_workers -- 0
> > +assert(n_workers == 0)
>
> These changes should not be done, IMO. Most of our
> tests are diff based, and therefore it is ok to write
> a statement just to print it. It is not only simpler, but
> also allows to print the actual value, if it didn't match
> the expected value.
> For example, if n_workers becomes not 0, we would see its
> actual value in the diff. When we use assert(), we won't
> see anything except an error message 'assertion failed'.
I'm used to the language that has "smart" assertions that show
content compared by asserts. Like pytest -
https://docs.pytest.org/en/3.0.1/assert.html
Example:
def test_function():
> assert f() == 4
E assert 3 == 4
E + where 3 = f()
> I propose to allow writing non-functional statements in
> test/ dir.
removed previously added asserts
--
sergeyb@
next prev parent reply other threads:[~2020-04-14 7:49 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-08 15:42 [Tarantool-patches] [PATCH v2 0/6] Add static analysis with luacheck Sergey Bronnikov
2020-04-08 15:43 ` [Tarantool-patches] [PATCH v2 1/6] Fix luacheck warnings in src/lua/ Sergey Bronnikov
2020-04-09 4:31 ` Alexander Tikhonov
2020-04-11 16:54 ` Vladislav Shpilevoy
2020-04-08 15:43 ` [Tarantool-patches] [PATCH v2 2/6] Fix luacheck warnings in test/ Sergey Bronnikov
2020-04-09 4:31 ` Alexander Tikhonov
2020-04-11 16:54 ` Vladislav Shpilevoy
2020-04-14 7:49 ` Sergey Bronnikov [this message]
2020-04-11 16:54 ` Vladislav Shpilevoy
2020-04-08 15:43 ` [Tarantool-patches] [PATCH v2 3/6] Fix luacheck warnings in src/box/lua/ Sergey Bronnikov
2020-04-09 4:29 ` Alexander Tikhonov
2020-04-08 15:43 ` [Tarantool-patches] [PATCH v2 4/6] Fix luacheck warnings in extra/dist/tarantoolctl.in Sergey Bronnikov
2020-04-09 4:29 ` Alexander Tikhonov
2020-04-09 7:30 ` Oleg Babin
2020-04-10 14:05 ` Sergey Bronnikov
2020-04-15 15:14 ` Igor Munkin
2020-04-15 15:37 ` Igor Munkin
2020-04-08 15:43 ` [Tarantool-patches] [PATCH v2 5/6] Add luacheck config Sergey Bronnikov
2020-04-09 4:27 ` Alexander Tikhonov
2020-04-11 16:54 ` Vladislav Shpilevoy
2020-04-13 15:16 ` Sergey Bronnikov
2020-04-14 23:29 ` Vladislav Shpilevoy
2020-04-15 8:30 ` Sergey Bronnikov
2020-04-08 15:43 ` [Tarantool-patches] [PATCH v2 6/6] gitlab-ci: enable static analysis with luacheck Sergey Bronnikov
2020-04-09 4:20 ` Alexander Tikhonov
2020-04-10 14:53 ` Sergey Bronnikov
2020-04-22 8:45 ` Alexander Tikhonov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200414074953.GA51517@pony.bronevichok.ru \
--to=sergeyb@tarantool.org \
--cc=estetus@gmail.com \
--cc=o.piskunov@tarantool.org \
--cc=tarantool-patches@dev.tarantool.org \
--cc=v.shpilevoy@tarantool.org \
--subject='Re: [Tarantool-patches] [PATCH v2 2/6] Fix luacheck warnings in test/' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox