[[nbpython-commits]] [hg] main/contrib: Apply patch from tk_fhd_aui for 158652: Pytho...

  • From: Tor Norbye < >
  • To:
  • Subject: [[nbpython-commits]] [hg] main/contrib: Apply patch from tk_fhd_aui for 158652: Pytho...
  • Date: Thu, 21 Oct 2010 08:34:35 -0700

changeset 9264d3fa276f in main/contrib
details: http://hg.netbeans.org/main/contrib?cmd=changeset;node=9264d3fa276f
description:
        Apply patch from tk_fhd_aui for 158652: Python Test Runner does not 
include test root directories into Python Path

diffstat:

 
python.testrunner/src/org/netbeans/modules/python/testrunner/PyUnitRunner.java
 |  12 ++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diffs (36 lines):

diff --git 
a/python.testrunner/src/org/netbeans/modules/python/testrunner/PyUnitRunner.java
 
b/python.testrunner/src/org/netbeans/modules/python/testrunner/PyUnitRunner.java
--- 
a/python.testrunner/src/org/netbeans/modules/python/testrunner/PyUnitRunner.java
+++ 
b/python.testrunner/src/org/netbeans/modules/python/testrunner/PyUnitRunner.java
@@ -42,6 +42,7 @@
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
+import java.util.logging.Level;
 import java.util.logging.Logger;
 import org.netbeans.api.project.FileOwnerQuery;
 import org.netbeans.api.project.Project;
@@ -199,6 +200,10 @@
         File f = FileUtil.toFile(fo);
         pythonPath.add(f.getAbsolutePath());
       }
+      for (FileObject fo : project.getTestRoots().getRoots()) {
+          File f = FileUtil.toFile(fo);
+          pythonPath.add(f.getAbsolutePath());
+      }
       PythonProjectProperties properties = new 
PythonProjectProperties(project);
       pythonPath.addAll(properties.getPythonPath());
       return pythonPath ;
@@ -267,6 +272,13 @@
                 desc = coverageProvider.wrapWithCoverage(desc);
             }
 
+            if (LOGGER.isLoggable(Level.INFO)) {
+                LOGGER.log(Level.INFO, "Running Python Unit Test with the 
following descriptor: command={0} " +
+                        "commandArgs={1} displayName={2} javaPath={3} 
path={4} script={5} scriptArgs={6}" +
+                        " workingDirectory={7}", new 
Object[]{desc.getCommand(), desc.getCommandArgs(),
+                        desc.getDisplayName(), desc.getJavaPath(), 
desc.getPath(), desc.getScript(),
+                        desc.getScriptArgs(), desc.getWorkingDirectory()});
+            }
 
         final TestSession session = new TestSession(name,
                 project,

[[nbpython-commits]] [hg] main/contrib: Apply patch from tk_fhd_aui for 158652: Pytho...

Tor Norbye 10/21/2010

Project Features

About this Project

www was started in November 2009, is owned by jpirek, and has 21 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20131025.e7cbc9d). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close