summaryrefslogtreecommitdiff
path: root/dev-python/twisted/files/trial
diff options
context:
space:
mode:
Diffstat (limited to 'dev-python/twisted/files/trial')
-rwxr-xr-xdev-python/twisted/files/trial22
1 files changed, 22 insertions, 0 deletions
diff --git a/dev-python/twisted/files/trial b/dev-python/twisted/files/trial
new file mode 100755
index 000000000000..8da58861abf6
--- /dev/null
+++ b/dev-python/twisted/files/trial
@@ -0,0 +1,22 @@
+#!/usr/bin/env python
+# Copyright (c) Twisted Matrix Laboratories.
+# See LICENSE for details.
+import os, sys
+
+try:
+ import _preamble
+except ImportError:
+ try:
+ sys.exc_clear()
+ except AttributeError:
+ # exc_clear() (and the requirement for it) has been removed from Py3
+ pass
+
+# begin chdir armor
+sys.path[:] = map(os.path.abspath, sys.path)
+# end chdir armor
+
+sys.path.insert(0, os.path.abspath(os.getcwd()))
+
+from twisted.scripts.trial import run
+run()