Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8)

Unified Diff: appengine/components/components/test_env.py

Issue 1478573003: Symlink test_env.py instead of test_support in preparation of jinja2. (Closed) Base URL: git@github.com:luci/luci-py.git@2_jinja2
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: appengine/components/components/test_env.py
diff --git a/appengine/components/components/test_env.py b/appengine/components/components/test_env.py
new file mode 100644
index 0000000000000000000000000000000000000000..1f3c776a7d11fd77c45377ef20cd8f67a7ca9541
--- /dev/null
+++ b/appengine/components/components/test_env.py
@@ -0,0 +1,18 @@
+# Copyright 2015 The Swarming Authors. All rights reserved.
+# Use of this source code is governed by the Apache v2.0 license that can be
+# found in the LICENSE file.
+
+import os
+import sys
+
+COMPONENTS_DIR = os.path.dirname(os.path.realpath(os.path.abspath(__file__)))
+
+
+def setup_test_env():
+ """Sets up App Engine test environment."""
+ sys.path.insert(0, os.path.join(COMPONENTS_DIR, 'third_party'))
+ if COMPONENTS_DIR not in sys.path:
+ sys.path.insert(0, COMPONENTS_DIR)
+
+ from test_support import test_env
+ test_env.setup_test_env()

Powered by Google App Engine
This is Rietveld 408576698