Hi Stephen, > From: Stephen Warren <swar...@wwwdotorg.org> > Sent: lundi 22 juin 2020 20:51 > > On 6/19/20 6:03 AM, Patrick Delaunay wrote: > > Add a pytest for testing the env info sub-command: > > > > test_env_info: test command with several option that can be executed > > on real hardware device without assumption > > > > test_env_info_sandbox: test the result on sandbox with a known ENV > > configuration: ready & default & persistent > > > > The quiet option '-q' is used for support in shell test; for example: > > if env info -p -d -q; then env save; fi > > Acked-by: Stephen Warren <swar...@nvidia.com>
Thanks > > +def test_env_info(state_test_env): > ... > > + for l in response.split('\n'): > > + if 'env_valid = ' in l: > > + assert '= invalid' in l or '= valid' in l or '= redundant' in l > > + nb_line += 1 > > + elif 'env_ready =' in l or 'env_use_default =' in l: > > + assert '= true' in l or '= false' in l > > + nb_line += 1 > > + else: > > + assert true > > Those last two lines don't seem terribly useful:-) Not really, beacuse I add the nb_line check, this first check can be removed. Do expect a V6 just for that? Patrick