Commits

Lukasz Balcerzak committed 1c74693

Show full command that is being run during tests

  • Participants
  • Parent commits 8dd1345

Comments (0)

Files changed (2)

tests/test_venv.py

     venv.update()
     mocksession.report.expect("verbosity0", "*recreate*")
 
+def test_test_runtests_action_command_is_in_output(newmocksession):
+    mocksession = newmocksession([], '''
+        [testenv]
+        commands = echo foo bar
+    ''')
+    venv = mocksession.getenv('python')
+    venv.update()
+    venv.test()
+    mocksession.report.expect("verbosity0", "*runtests*commands?0? | echo foo bar")
+
 def test_install_error(newmocksession, monkeypatch):
     mocksession = newmocksession(['--recreate'], """
         [testenv]
             self.session.make_emptydir(self.envconfig.envtmpdir)
             cwd = self.envconfig.changedir
             for i, argv in enumerate(self.envconfig.commands):
-                action.setactivity("runtests", "commands[%s]" % i)
+                message = "commands[%s] | %s" % (i, ' '.join(argv))
+                action.setactivity("runtests", message)
                 try:
                     self._pcall(argv, cwd=cwd, action=action, redirect=redirect)
                 except tox.exception.InvocationError: