HomePhabricator

tests: use proctutil.stdout.write() instead of print() in test-extension.t

Authored by pulkit.

Description

tests: use proctutil.stdout.write() instead of print() in test-extension.t

I was debugging this test failure on python3 + chg. I get the following hunk as
test failure:

@@ -206,6 +206,18 @@ Check normal command's load order of ext
   4) bar uipopulate
   5) foo reposetup
   5) bar reposetup
+  4) foo uipopulate (chg !)
+  4) bar uipopulate (chg !)
+  4) foo uipopulate (chg !)
+  4) bar uipopulate (chg !)
+  4) foo uipopulate (chg !)
+  4) bar uipopulate (chg !)
+  4) foo uipopulate (chg !)
+  4) bar uipopulate (chg !)
+  4) foo uipopulate (chg !)
+  4) bar uipopulate (chg !)
+  5) foo reposetup (chg !)
+  5) bar reposetup (chg !)
   0:c24b9ac61126

After hours of debugging and head scracthing, I figured out that something is
wrong with output flushing. I initially switched the print() statements to
ui.warn() but thanks to Yuya who suggested using procutil.stdout.write()
instead.

Details

Committed
pulkitJun 18 2020, 8:24 AM
Parents
rHG9bedcfb4bb0e: fuzz: tell manifest fuzzer about longer node hashes
Branches
Unknown
Tags
Unknown