Author: Michael Banck <mbanck@debian.org>
Description: Patch to make the test-suite work during debian build-time.
Forwarded: not-needed

--- /dev/null
+++ b/test/pymol-test
@@ -0,0 +1,43 @@
+#!/usr/bin/env python
+# NOTE: This file is now obsolete.  However it has been left functional
+# and intact in order to promote backwards compatibility with existing
+# PyMOL installs.
+#
+# Future installations should launch pymol by running:
+#   "python $PYMOL_PATH/modules/pymol/__init__.py" instead.
+# or
+#   by importing "pymol" from within a standalone Python script
+#   followed immediately by a call to pymol.finish_launching()
+
+import thread
+import threading
+import os
+import sys
+import time
+import __main__
+
+# let pymol/__init__.py known that we're launching using the old way
+
+__main__.pymol_launch = 0
+
+if hasattr(__main__,"pymol_argv"):
+   pymol_argv = __main__.pymol_argv
+else:
+   pymol_argv = sys.argv
+
+modules_path = '../debian/pymol/usr/lib/python' + sys.version[0:3] + '/site-packages'
+
+if modules_path not in sys.path:
+   sys.path.append(modules_path
+
+modules_path = '../debian/pymol/usr/lib/python' + sys.version[0:3] + '/dist-packages'
+
+if modules_path not in sys.path:
+   sys.path.append(modules_path)
+
+import pymol
+
+pymol.invocation.parse_args(pymol_argv)
+
+pymol.start_pymol()
+
--- a/test/run
+++ b/test/run
@@ -36,7 +36,7 @@ if len(argv):
 # ---
 
 pymol = "pymol"
-cmd = "../pymol"
+cmd = "./pymol-test"
 if not os.path.exists(cmd):
    cmd = "../../build/Deployment/MacPyMOL.app/Contents/MacOS/MacPyMOL"
 cmp = "cmp"
@@ -94,7 +94,8 @@ for test in tests:
                diffs = df.readlines()
                df.close()
                print " run_tests: "+ \
-                  postfx+" DIFFERS over about %d lines." % int(len(diffs)/2)
+                  postfx+" DIFFERS over about %d lines:" % int(len(diffs)/2)
+               print diffs
          else:
             print " run_tests: "+postfx+" is missing."
             
