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

Unified Diff: native_client_sdk/src/tools/tests/oshelpers_test.py

Issue 11571032: [NaCl SDK] cleanup python unittests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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
« no previous file with comments | « native_client_sdk/src/tools/tests/httpd_test.py ('k') | native_client_sdk/src/tools/tests/test_httpd.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: native_client_sdk/src/tools/tests/oshelpers_test.py
diff --git a/native_client_sdk/src/tools/zip_test.py b/native_client_sdk/src/tools/tests/oshelpers_test.py
similarity index 97%
rename from native_client_sdk/src/tools/zip_test.py
rename to native_client_sdk/src/tools/tests/oshelpers_test.py
index 6c09cde4479b128216137937e6b0453758715a8c..e73f97871531fad4d23c335e8e988833e248475f 100755
--- a/native_client_sdk/src/tools/zip_test.py
+++ b/native_client_sdk/src/tools/tests/oshelpers_test.py
@@ -4,7 +4,6 @@
# found in the LICENSE file.
import os
-import oshelpers
import shutil
import subprocess
import sys
@@ -12,6 +11,12 @@ import tempfile
import unittest
import zipfile
+SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
+PARENT_DIR = os.path.dirname(SCRIPT_DIR)
+
+sys.path.append(PARENT_DIR)
+
+import oshelpers
class RunZipError(subprocess.CalledProcessError):
def __init__(self, retcode, command, output, error_output):
@@ -46,7 +51,7 @@ class TestZip(unittest.TestCase):
self.zipname = self.id().split('.')[-1] + '.zip'
self.zipfile = None
self.tempdir = tempfile.mkdtemp()
- shutil.copy(os.path.join(os.path.dirname(__file__), 'oshelpers.py'),
+ shutil.copy(os.path.join(PARENT_DIR, 'oshelpers.py'),
self.tempdir)
def tearDown(self):
« no previous file with comments | « native_client_sdk/src/tools/tests/httpd_test.py ('k') | native_client_sdk/src/tools/tests/test_httpd.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698