7 new revisions:

Revision: 99aa972ef94d
Author:   Pekka Klärck
Date:     Thu Jun 16 07:09:15 2011
Log:      fixed after test data change
http://code.google.com/p/robotframework/source/detail?r=99aa972ef94d

Revision: ba71a678cb8a
Author:   Pekka Klärck
Date:     Thu Jun 16 07:14:16 2011
Log:      fixed after test data change
http://code.google.com/p/robotframework/source/detail?r=ba71a678cb8a

Revision: 875d0e3b8b8e
Author:   Pekka Klärck
Date:     Thu Jun 16 07:21:33 2011
Log:      oops, cmp refactoring reversed the order...
http://code.google.com/p/robotframework/source/detail?r=875d0e3b8b8e

Revision: 92427ac65f8a
Author:   Pekka Klärck
Date:     Thu Jun 16 07:22:16 2011
Log:      fixed tests: only tag stat gets doc nowadays
http://code.google.com/p/robotframework/source/detail?r=92427ac65f8a

Revision: ccb2946c55bb
Author:   Pekka Klärck
Date:     Thu Jun 16 07:27:44 2011
Log:      fixed after test data change
http://code.google.com/p/robotframework/source/detail?r=ccb2946c55bb

Revision: a979c9bba769
Author:   Pekka Klärck
Date:     Thu Jun 16 07:30:30 2011
Log: 1) Use utils.abspath instead of utils.normpath when normcase was not n...
http://code.google.com/p/robotframework/source/detail?r=a979c9bba769

Revision: 7432090722eb
Author:   Pekka Klärck
Date:     Thu Jun 16 07:38:38 2011
Log:      merge
http://code.google.com/p/robotframework/source/detail?r=7432090722eb

==============================================================================
Revision: 99aa972ef94d
Author:   Pekka Klärck
Date:     Thu Jun 16 07:09:15 2011
Log:      fixed after test data change
http://code.google.com/p/robotframework/source/detail?r=99aa972ef94d

Modified:
 /atest/robot/core/filter_by_names.txt

=======================================
--- /atest/robot/core/filter_by_names.txt       Tue May 25 07:06:09 2010
+++ /atest/robot/core/filter_by_names.txt       Thu Jun 16 07:09:15 2011
@@ -111,7 +111,7 @@

 Filter Suite When Suites Are Ordered With Prefix
     Run Suites  --suite Suite2  ${DATADIR}/misc/multiple_suites
-    Should Be True  ${SUITE.suites} == ['Subsuite1']
+    Should Be True  ${SUITE.suites} == ['Sub.Suite.1']
     Should Be True  ${SUITE.suites[0].suites} == ['Suite2']

 *** Keywords ***

==============================================================================
Revision: ba71a678cb8a
Author:   Pekka Klärck
Date:     Thu Jun 16 07:14:16 2011
Log:      fixed after test data change
http://code.google.com/p/robotframework/source/detail?r=ba71a678cb8a

Modified:
 /atest/robot/core/suite_execution_order.txt

=======================================
--- /atest/robot/core/suite_execution_order.txt Tue May 25 04:54:30 2010
+++ /atest/robot/core/suite_execution_order.txt Thu Jun 16 07:14:16 2011
@@ -6,9 +6,8 @@

 *** Test Cases ***
 Suites Are Ordered Based On The Prefixes
-    ${exp} =  Catenate
-    ...  'Suite First', 'Subsuite1', 'Suite3', 'Suite4', 'Suite5',
+    ${exp} =  Catenate
+    ...  'Suite First', 'Sub.Suite.1', 'Suite3', 'Suite4', 'Suite5',
     ...  'Suite10', 'Suite 6', 'SUite7', 'suiTe 8', 'Suite 9 Name'
     Should Be Equal As Strings  ${SUITE.suites}  [${exp}]
Should Be Equal As Strings ${SUITE.suites[1].suites} ['Suite4', 'Suite2']
-

==============================================================================
Revision: 875d0e3b8b8e
Author:   Pekka Klärck
Date:     Thu Jun 16 07:21:33 2011
Log:      oops, cmp refactoring reversed the order...
http://code.google.com/p/robotframework/source/detail?r=875d0e3b8b8e

Modified:
 /src/robot/common/statistics.py

=======================================
--- /src/robot/common/statistics.py     Thu Jun 16 05:40:54 2011
+++ /src/robot/common/statistics.py     Thu Jun 16 07:21:33 2011
@@ -94,11 +94,11 @@

     def __cmp__(self, other):
         if self.critical != other.critical:
-            return cmp(self.critical, other.critical)
+            return cmp(other.critical, self.critical)
         if self.non_critical != other.non_critical:
-            return cmp(self.non_critical, other.non_critical)
+            return cmp(other.non_critical, self.non_critical)
         if bool(self.combined) != bool(other.combined):
-            return cmp(bool(self.combined), bool(other.combined))
+            return cmp(bool(other.combined), bool(self.combined))
         return cmp(self.name, other.name)

     def serialize(self, serializer):

==============================================================================
Revision: 92427ac65f8a
Author:   Pekka Klärck
Date:     Thu Jun 16 07:22:16 2011
Log:      fixed tests: only tag stat gets doc nowadays
http://code.google.com/p/robotframework/source/detail?r=92427ac65f8a

Modified:
 /atest/robot/output/statistics.txt

=======================================
--- /atest/robot/output/statistics.txt  Thu May 19 03:46:53 2011
+++ /atest/robot/output/statistics.txt  Thu Jun 16 07:22:16 2011
@@ -42,18 +42,18 @@

 *** Keywords ***
 Node Information Should Be Correct
-    [Arguments]  ${node}  ${name}  ${pass}  ${fail}  ${doc}=
+    [Arguments]  ${node}  ${name}  ${pass}  ${fail}
     Should be equal  ${node.text}  ${name}
     Should be equal  ${node.attrs['pass']}  ${pass}
     Should be equal  ${node.attrs['fail']}  ${fail}
-    Should be equal  ${node.attrs['doc']}   ${doc}

 Tag Node Information Should Be Correct
[Arguments] ${node} ${name} ${pass} ${fail} ${info}= ${doc}= ${links}= - Node Information Should Be Correct ${node} ${name} ${pass} ${fail} ${doc}
+    Node Information Should Be Correct  ${node}  ${name}  ${pass}  ${fail}
     Should be equal  ${node.attrs['info']}  ${info}
+    Should be equal  ${node.attrs['doc']}   ${doc}
     Should be equal  ${node.attrs['links']}  ${links}

 Suite Node Information Should Be Correct
     [Arguments]  ${node}  ${name}  ${pass}  ${fail}
- Node Information Should Be Correct ${node} ${name} ${pass} ${fail} ${name}
+    Node Information Should Be Correct  ${node}  ${name}  ${pass}  ${fail}

==============================================================================
Revision: ccb2946c55bb
Author:   Pekka Klärck
Date:     Thu Jun 16 07:27:44 2011
Log:      fixed after test data change
http://code.google.com/p/robotframework/source/detail?r=ccb2946c55bb

Modified:
 /atest/robot/cli/runner/random_order.txt

=======================================
--- /atest/robot/cli/runner/random_order.txt    Tue Aug 24 03:15:42 2010
+++ /atest/robot/cli/runner/random_order.txt    Thu Jun 16 07:27:44 2011
@@ -4,7 +4,7 @@
 Resource        atest_resource.txt

 *** Variables ***
-${DEFAULT SUITE ORDER} ['Suite First', 'Subsuite1', 'Suite3', 'Suite4', 'Suite5', 'Suite10', 'Suite 6', 'SUite7', 'suiTe 8', 'Suite 9 Name'] +${DEFAULT SUITE ORDER} ['Suite First', 'Sub.Suite.1', 'Suite3', 'Suite4', 'Suite5', 'Suite10', 'Suite 6', 'SUite7', 'suiTe 8', 'Suite 9 Name'] ${DEFAULT TEST ORDER} ['test1', 'test2', 'test3', 'test4', 'test5', 'test6', 'test7', 'test8', 'test9', 'test10', 'test11', 'test12']

 *** Test Cases ***
@@ -32,6 +32,6 @@

 Get Tests
Comment This keyword is needed as there is also one directory suite, which does not contain tests. - ${tests} = Set Variable If '${SUITE.suites[0].name}' == 'Subsuite1' ${SUITE.suites[0].suites[0].tests} ${SUITE.suites[0].tests} + ${tests} = Set Variable If '${SUITE.suites[0].name}' == 'Sub.Suite.1' ${SUITE.suites[0].suites[0].tests} ${SUITE.suites[0].tests}
     [Return]  ${tests}


==============================================================================
Revision: a979c9bba769
Author:   Pekka Klärck
Date:     Thu Jun 16 07:30:30 2011
Log: 1) Use utils.abspath instead of utils.normpath when normcase was not needed.
2) utils.normcase now always casenormalizes (on case insensitive OSes).

Update issue 307
Refactored code related to this. I still want to add an explicit
test for not casenormalizing paths but otherwise this is pretty
much done.
http://code.google.com/p/robotframework/source/detail?r=a979c9bba769

Modified:
 /src/robot/common/model.py
 /src/robot/conf/settings.py
 /src/robot/running/importer.py
 /src/robot/running/model.py
 /src/robot/running/namespace.py
 /src/robot/running/testlibraries.py
 /src/robot/utils/argumentparser.py
 /src/robot/utils/importing.py
 /src/robot/utils/robotpath.py

=======================================
--- /src/robot/common/model.py  Wed Jun 15 04:01:03 2011
+++ /src/robot/common/model.py  Thu Jun 16 07:30:30 2011
@@ -66,7 +66,7 @@

     def __init__(self, name, source=None, parent=None):
         _TestAndSuiteHelper.__init__(self, name, parent)
-        self.source = source is not None and utils.normpath(source) or None
+        self.source = source is not None and utils.abspath(source) or None
         self.metadata = utils.NormalizedDict()
         self.suites = []
         self.tests = []
=======================================
--- /src/robot/conf/settings.py Thu Jun 16 03:54:33 2011
+++ /src/robot/conf/settings.py Thu Jun 16 07:30:30 2011
@@ -86,7 +86,7 @@
         if name in self._output_opts and utils.eq(value, 'NONE'):
             return 'NONE'
         if name == 'OutputDir':
-            return utils.normpath(value)
+            return utils.abspath(value)
         if name in ['SuiteStatLevel', 'MonitorWidth']:
             return self._convert_to_integer(name, value)
         if name in ['Listeners', 'VariableFiles']:
@@ -120,7 +120,7 @@
         if self._outputfile_disabled(type_, name):
             return 'NONE'
         name = self._process_output_name(name, type_)
-        path = utils.normpath(os.path.join(self['OutputDir'], name), False)
+        path = utils.abspath(os.path.join(self['OutputDir'], name))
         self._create_output_dir(os.path.dirname(path), type_)
         return path

=======================================
--- /src/robot/running/importer.py      Wed Jun 15 07:51:01 2011
+++ /src/robot/running/importer.py      Thu Jun 16 07:30:30 2011
@@ -102,7 +102,7 @@

     def _norm_path_key(self, key):
         if isinstance(key, basestring) and os.path.exists(key):
-            return utils.normpath(key, normcase=True)
+            return utils.normpath(key)
         if isinstance(key, (tuple, list)):
             return [self._norm_path_key(k) for k in key]
         return key
=======================================
--- /src/robot/running/model.py Tue Jun 14 08:48:57 2011
+++ /src/robot/running/model.py Thu Jun 16 07:30:30 2011
@@ -32,7 +32,7 @@


 def TestSuite(datasources, settings):
-    datasources = [ utils.normpath(path) for path in datasources ]
+    datasources = [utils.abspath(path) for path in datasources]
suite = _get_suite(datasources, settings['SuiteNames'], settings['WarnOnSkipped'])
     suite.set_options(settings)
     _check_suite_contains_tests(suite, settings['RunEmptySuite'])
=======================================
--- /src/robot/running/namespace.py     Wed Jun 15 07:51:01 2011
+++ /src/robot/running/namespace.py     Thu Jun 16 07:30:30 2011
@@ -166,12 +166,7 @@
if setting_name == 'Library' and not self._is_library_by_path(path, basedir):
             return path
path = self._resolve_path(setting_name, path.replace('/', os.sep), basedir)
-        if setting_name in ['Variables','Library']:
-            dirname, filename = os.path.split(os.path.normpath(path))
-            path = os.path.join(utils.normpath(dirname), filename)
-        else:
-            path = utils.normpath(path)
-        return path
+        return utils.abspath(path)

     def _is_library_by_path(self, path, basedir):
         return path.lower().endswith(('.py', '.java', '.class', '/'))
=======================================
--- /src/robot/running/testlibraries.py Wed May 25 04:34:07 2011
+++ /src/robot/running/testlibraries.py Thu Jun 16 07:30:30 2011
@@ -87,7 +87,7 @@

     def __init__(self, libcode, source, name, args, variables):
         if os.path.exists(name):
- name = os.path.splitext(os.path.basename(os.path.normpath(name)))[0] + name = os.path.splitext(os.path.basename(os.path.abspath(name)))[0]
         self.source = source
         self.version = self._get_version(libcode)
         self.name = name
=======================================
--- /src/robot/utils/argumentparser.py  Fri Apr 15 13:29:35 2011
+++ /src/robot/utils/argumentparser.py  Thu Jun 16 07:30:30 2011
@@ -345,7 +345,7 @@
         temp = []
         for path in self._split_pythonpath(paths):
             temp.extend(glob.glob(path))
-        return [os.path.normpath(path) for path in temp if path != '']
+        return [os.path.abspath(path) for path in temp if path]

     def _split_pythonpath(self, paths):
         # paths may already contain ':' as separator
=======================================
--- /src/robot/utils/importing.py       Thu May 19 13:13:43 2011
+++ /src/robot/utils/importing.py       Thu Jun 16 07:30:30 2011
@@ -36,10 +36,11 @@
     sys.path.insert(0, moddir)
     try:
         module = __import__(modname)
-        if hasattr(module, '__file__') and \
- normpath(os.path.dirname(module.__file__)) != normpath(moddir):
-            del sys.modules[modname]
-            module = __import__(modname)
+        if hasattr(module, '__file__'):
+            impdir = os.path.dirname(module.__file__)
+            if normpath(impdir) != normpath(moddir):
+                del sys.modules[modname]
+                module = __import__(modname)
         return module
     finally:
         sys.path.pop(0)
@@ -117,10 +118,7 @@

 def _get_module_source(module):
     source = getattr(module, '__file__', None)
-    if not source:
-        return '<unknown>'
-    dirpath, filename = os.path.split(abspath(source))
-    return os.path.join(normpath(dirpath), filename)
+    return abspath(source) if source else '<unknown>'

 def _raise_import_failed(type_, name):
     error_msg, error_details = get_error_details()
=======================================
--- /src/robot/utils/robotpath.py       Wed Jun 15 07:51:01 2011
+++ /src/robot/utils/robotpath.py       Thu Jun 16 07:30:30 2011
@@ -27,14 +27,14 @@
         _CASE_INSENSITIVE_FILESYSTEM = False


-def normpath(path, normcase=False):
+def normpath(path):
     """Returns path in normalized and absolute format.

-    On case-insensitive file systems the path is also case normalized is
-    `normcase` is True.
+    On case-insensitive file systems the path is also case normalized.
+    If that is not desired, abspath should be used instead.
     """
     path = abspath(path)
-    if normcase and _CASE_INSENSITIVE_FILESYSTEM:
+    if _CASE_INSENSITIVE_FILESYSTEM:
         path = path.lower()
     return path

@@ -71,8 +71,8 @@
     return url.replace('%5C', '/').replace('%3A', ':').replace('|', ':')

 def _get_pathname(target, base):
-    target = normpath(target, normcase=False)
-    base = normpath(base, normcase=False)
+    target = abspath(target)
+    base = abspath(base)
     if os.path.isfile(base):
         base = os.path.dirname(base)
     if base == target:

==============================================================================
Revision: 7432090722eb
Author:   Pekka Klärck
Date:     Thu Jun 16 07:38:38 2011
Log:      merge
http://code.google.com/p/robotframework/source/detail?r=7432090722eb


Reply via email to