changeset 30931:f2ad0d804700

test-bdiff: move import inside the function to avoid test failure test-check-module-imports.t fails on some systems where the path of home directories is different than sys.prefix and sys.exec_prefix. Importing silenttestrunner will help avoiding that failure.
author Pulkit Goyal <7895pulkit@gmail.com>
date Tue, 14 Feb 2017 01:52:16 +0530
parents 517bc1cd7033
children f61c5680a862
files tests/test-bdiff.py
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-bdiff.py	Sun Feb 12 22:28:09 2017 -0800
+++ b/tests/test-bdiff.py	Tue Feb 14 01:52:16 2017 +0530
@@ -3,8 +3,6 @@
 import struct
 import unittest
 
-import silenttestrunner
-
 from mercurial import (
     bdiff,
     mpatch,
@@ -148,4 +146,5 @@
                          ['a\n', diffreplace(2, 10, 'a\na\na\na\n', '')])
 
 if __name__ == '__main__':
+    import silenttestrunner
     silenttestrunner.main(__name__)