4 new revisions:
Revision: 2205bd0196f2
Branch: default
Author: Pekka Klärck
Date: Thu Nov 28 13:25:17 2013 UTC
Log: implemented utils.iterable and took it into use in one place. can
also...
http://code.google.com/p/robotframework/source/detail?r=2205bd0196f2
Revision: 09bbd5029ba9
Branch: default
Author: Pekka Klärck
Date: Thu Nov 28 14:22:03 2013 UTC
Log: genrunner.py: support specifying custom runner file name
http://code.google.com/p/robotframework/source/detail?r=09bbd5029ba9
Revision: 26b3e1d0b4a6
Branch: default
Author: Pekka Klärck
Date: Thu Nov 28 14:49:09 2013 UTC
Log: Fixed --dryrun with java libraries....
http://code.google.com/p/robotframework/source/detail?r=26b3e1d0b4a6
Revision: b2488d8b4ebd
Branch: default
Author: Pekka Klärck
Date: Thu Nov 28 14:49:23 2013 UTC
Log: Automated merge with https://code.google.com/p/robotframework/
http://code.google.com/p/robotframework/source/detail?r=b2488d8b4ebd
==============================================================================
Revision: 2205bd0196f2
Branch: default
Author: Pekka Klärck
Date: Thu Nov 28 13:25:17 2013 UTC
Log: implemented utils.iterable and took it into use in one place. can
also be used elsewhere.
http://code.google.com/p/robotframework/source/detail?r=2205bd0196f2
Modified:
/src/robot/utils/__init__.py
/src/robot/utils/misc.py
/src/robot/variables/variables.py
=======================================
--- /src/robot/utils/__init__.py Thu Nov 21 12:51:47 2013 UTC
+++ /src/robot/utils/__init__.py Thu Nov 28 13:25:17 2013 UTC
@@ -46,7 +46,8 @@
from .markupwriters import HtmlWriter, XmlWriter, NullMarkupWriter
from .importer import Importer
from .match import eq, Matcher, MultiMatcher
-from .misc import plural_or_not, printable_name, seq2str, seq2str2,
getdoc, isatty
+from .misc import (isatty, getdoc, iterable, plural_or_not, printable_name,
+ seq2str, seq2str2)
from .normalizing import lower, normalize, NormalizedDict
from .robotenv import get_env_var, set_env_var, del_env_var, get_env_vars
from .robotinspect import is_java_init, is_java_method
=======================================
--- /src/robot/utils/misc.py Thu Jun 6 14:00:44 2013 UTC
+++ /src/robot/utils/misc.py Thu Nov 28 13:25:17 2013 UTC
@@ -105,6 +105,17 @@
return unic(doc)
+def iterable(item):
+ if isinstance(item, basestring):
+ return False
+ try:
+ iter(item)
+ except TypeError:
+ return False
+ else:
+ return True
+
+
# On IronPython sys.stdxxx.isatty() always returns True
if sys.platform != 'cli':
=======================================
--- /src/robot/variables/variables.py Tue Nov 19 12:49:36 2013 UTC
+++ /src/robot/variables/variables.py Thu Nov 28 13:25:17 2013 UTC
@@ -126,11 +126,7 @@
value = self._find_variable(name)
except KeyError:
value = self._get_extended_var(name)
- try:
- if isinstance(value, basestring):
- raise TypeError
- iter(value)
- except TypeError:
+ if not utils.iterable(value):
raise DataError("Using scalar variable '%s' as list
variable '@%s' "
"requires its value to be list or list-like."
% (name, name[1:]))
==============================================================================
Revision: 09bbd5029ba9
Branch: default
Author: Pekka Klärck
Date: Thu Nov 28 14:22:03 2013 UTC
Log: genrunner.py: support specifying custom runner file name
http://code.google.com/p/robotframework/source/detail?r=09bbd5029ba9
Modified:
/atest/genrunner.py
=======================================
--- /atest/genrunner.py Mon Sep 24 12:28:34 2012 UTC
+++ /atest/genrunner.py Thu Nov 28 14:22:03 2013 UTC
@@ -2,20 +2,22 @@
"""Script to generate atest runners based on plain text data files.
-Usage: %s path/to/data.txt
+Usage: %s testdata/path/data.txt [robot/path/runner.txt]
"""
-from __future__ import with_statement
from os.path import abspath, basename, dirname, exists, join, splitext
import os
import sys
-if len(sys.argv) != 2 or splitext(sys.argv[1])[1] != '.txt':
+if len(sys.argv) not in [2, 3] or not all(a.endswith('.txt') for a in
sys.argv[1:]):
print __doc__ % basename(sys.argv[0])
sys.exit(1)
INPATH = abspath(sys.argv[1])
-OUTPATH = INPATH.replace(join('atest', 'testdata'), join('atest', 'robot'))
+if len(sys.argv) == 2:
+ OUTPATH = INPATH.replace(join('atest', 'testdata'),
join('atest', 'robot'))
+else:
+ OUTPATH = sys.argv[2]
if not exists(dirname(OUTPATH)):
os.mkdir(dirname(OUTPATH))
==============================================================================
Revision: 26b3e1d0b4a6
Branch: default
Author: Pekka Klärck
Date: Thu Nov 28 14:49:09 2013 UTC
Log: Fixed --dryrun with java libraries.
Update issue 1589
Status: Started
Fixed the bug and also another related bug that occurred after it was
fixed. Tests are under construction.
http://code.google.com/p/robotframework/source/detail?r=26b3e1d0b4a6
Modified:
/src/robot/running/arguments/argumentresolver.py
/src/robot/running/handlers.py
=======================================
--- /src/robot/running/arguments/argumentresolver.py Thu Sep 12 13:22:29
2013 UTC
+++ /src/robot/running/arguments/argumentresolver.py Thu Nov 28 14:49:09
2013 UTC
@@ -104,4 +104,6 @@
positional = variables.replace_list(positional,
self._resolve_until)
named = dict((name, variables.replace_scalar(value))
for name, value in named.items())
+ else:
+ positional = list(positional)
return positional, named
=======================================
--- /src/robot/running/handlers.py Thu Nov 21 12:51:47 2013 UTC
+++ /src/robot/running/handlers.py Thu Nov 28 14:49:09 2013 UTC
@@ -187,7 +187,7 @@
code_object = getattr(handler, 'im_func', handler)
return code_object.argslist[:code_object.nargs]
- def resolve_arguments(self, args, variables):
+ def resolve_arguments(self, args, variables=None):
positional, named = self._argument_resolver.resolve(args,
variables)
positional = self._arg_coercer.coerce(positional)
return positional, named
==============================================================================
Revision: b2488d8b4ebd
Branch: default
Author: Pekka Klärck
Date: Thu Nov 28 14:49:23 2013 UTC
Log: Automated merge with https://code.google.com/p/robotframework/
http://code.google.com/p/robotframework/source/detail?r=b2488d8b4ebd
--
---
You received this message because you are subscribed to the Google Groups "robotframework-commit" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.