about summary refs log tree commit diff
path: root/clients/tests/test-client.py
diff options
context:
space:
mode:
Diffstat (limited to 'clients/tests/test-client.py')
-rwxr-xr-xclients/tests/test-client.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/clients/tests/test-client.py b/clients/tests/test-client.py
index e8f1f7f2..fee874ba 100755
--- a/clients/tests/test-client.py
+++ b/clients/tests/test-client.py
@@ -7,7 +7,7 @@ from __future__ import print_function
 # This test starts NetworkManager stub service in a user D-Bus session,
 # and runs nmcli against it. The output is recorded and compared to a pre-generated
 # expected output (clients/tests/test-client.check-on-disk/*.expected) which
-# is also commited to git.
+# is also committed to git.
 #
 ###############################################################################
 #
@@ -27,7 +27,7 @@ from __future__ import print_function
 #    #  $ LANG=pl_PL.UTF-8 ./clients/cli/nmcli --version
 #    # also ensure that `locale -a` reports the Polish locale.
 #  $ rm -rf  clients/tests/test-client.check-on-disk/*.expected
-#    # (step seldomly required)
+#    # (step seldom required)
 #    # Sometimes, if you want to be sure that the test would generate
 #    # exactly the same .expected files, purge the previous version first.
 #    # This is only necessary, when you remove test from this file.
@@ -744,10 +744,11 @@ class TestNmcli(NmTestBase):
                     skip_test_for_l10n_diff.append(n['test_name'])
                     continue
                 print("\n\n\nThe file '%s' does not have the expected content:" % (filename))
-                print("ACTUAL OUTPUT:\n[[%s]]\n" % (results_expect[i]))
-                print("EXPECT OUTPUT:\n[[%s]]\n" % (n['content']))
+                print("ACTUAL OUTPUT:\n[[%s]]\n" % (n['content']))
+                print("EXPECT OUTPUT:\n[[%s]]\n" % (results_expect[i]))
                 print("Let the test write the file by rerunning with NM_TEST_REGENERATE=1")
                 print("See howto in %s for details.\n" % (PathConfiguration.canonical_script_filename()))
+                sys.stdout.flush()
                 self.fail("Unexpected output of command, expected %s. Rerun test with NM_TEST_REGENERATE=1 to regenerate files" % (filename))
             if len(results_expect) != len(results):
                 if not regenerate:
@@ -758,6 +759,7 @@ class TestNmcli(NmTestBase):
                         print("EXPECT OUTPUT:\n[[%s]]\n" % (results_expect[len(results)]))
                     print("Let the test write the file by rerunning with NM_TEST_REGENERATE=1")
                     print("See howto in %s for details.\n" % (PathConfiguration.canonical_script_filename()))
+                    sys.stdout.flush()
                     self.fail("Unexpected output of command, expected %s. Rerun test with NM_TEST_REGENERATE=1 to regenerate files" % (filename))
 
         if regenerate: