1 new changeset in pytest:

http://bitbucket.org/hpk42/pytest/changeset/29e491274688/
changeset:   29e491274688
user:        RonnyPfannschmidt
date:        2011-09-25 23:26:49
summary:     correctly handle zero length cmdline arguments
affected #:  3 files (-1 bytes)

--- a/CHANGELOG Sun Sep 25 07:40:43 2011 +0200
+++ b/CHANGELOG Sun Sep 25 23:26:49 2011 +0200
@@ -1,6 +1,7 @@
 Changes between 2.1.2 and [next version]
 ----------------------------------------
 
+- correctly handle zero length arguments (a la pytest '')
 - fix issue67 / junitxml now contains correct test durations, thanks ronny
 - fix issue75 / skipping test failure on jython
 


--- a/_pytest/config.py Sun Sep 25 07:40:43 2011 +0200
+++ b/_pytest/config.py Sun Sep 25 23:26:49 2011 +0200
@@ -421,7 +421,7 @@
 
 
 def getcfg(args, inibasenames):
-    args = [x for x in args if str(x)[0] != "-"]
+    args = [x for x in args if not str(x).startswith("-")]
     if not args:
         args = [py.path.local()]
     for arg in args:


--- a/testing/test_config.py    Sun Sep 25 07:40:43 2011 +0200
+++ b/testing/test_config.py    Sun Sep 25 23:26:49 2011 +0200
@@ -16,6 +16,9 @@
         config._preparse([sub])
         assert config.inicfg['name'] == 'value'
 
+    def test_getcfg_empty_path(self, tmpdir):
+        cfg = getcfg([''], ['setup.cfg']) #happens on py.test  ""
+
     def test_append_parse_args(self, tmpdir):
         tmpdir.join("setup.cfg").write(py.code.Source("""
             [pytest]

Repository URL: https://bitbucket.org/hpk42/pytest/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
_______________________________________________
py-svn mailing list
py-svn@codespeak.net
http://codespeak.net/mailman/listinfo/py-svn

Reply via email to