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

Side by Side Diff: appengine/findit/util_scripts/__init__.py

Issue 2435863003: [Findit] Add local git parsers. (Closed)
Patch Set: Fix nits. Created 4 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 unified diff | Download patch
OLDNEW
(Empty)
1 # Copyright 2016 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 import os
6 import sys
7
8
9 _THIS_DIR = os.path.dirname(os.path.realpath(__file__))
10
11 # TODO(katesonia): Figure out why os.getenv('APPLICATION_ID') always return
12 # True for local unittest.
13 #
14 # This hack is due to testing setup and code structure.
15 #
16 # In testing setup, the root directory appengine/findit would be the current
17 # working directory during execution of unittests; and it is automatically
18 # added to sys.path or PYTHONPATH.
19 #
20 # The util_scripts/ are stand-alone local scripts and all the imports start
21 # from util_scripts, so added this util_scripts/ directory as working
stgao 2016/11/08 21:44:16 What's "working directory"? This sounds incorrect
Sharu Jiang 2016/11/10 22:28:37 I think the working directory here is the "current
stgao 2016/11/10 22:33:47 I'm confused with the terms here. But you may want
Sharu Jiang 2016/11/11 21:07:09 Done.
22 # directory.
23 sys.path.insert(0, _THIS_DIR)
24
25 # This hack is because the appengine_config.py is loaded by the testing setup
26 # only if it is in the root directory appengine/findit.
27 import appengine_config
stgao 2016/11/08 21:44:16 Why we have this here? Do you understand why it is
Sharu Jiang 2016/11/10 22:28:37 Done.
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698