Commits

holger krekel committed 5e7a891

fix issue33 - commentchars in key-value sections are ignored or to put it positively,
commentchars need to start the lstripp()ed line to have them ignored

  • Participants
  • Parent commits 9e0dd9b

Comments (0)

Files changed (5)

 1.4.dev
 -----------------
 
+- fix issue33 - commentchars are ignored in key-value settings allowing
+  for specifying commands like: python -c "import sys ; print sys"
+  which would formerly raise irritating errors because the ";"
+  was considered a comment
 - tweak and improve reporting
 - refactor reporting and virtualenv manipulation 
   to be more accessible from 3rd party tools
 
 def main():
     version = sys.version_info[:2]
-    install_requires = ['virtualenv>=1.7', 'py>=1.4.3', ]
+    install_requires = ['virtualenv>=1.7', 'py>=1.4.9.dev1', ]
     if version < (2,7) or (3,0) <= version <= (3,1):
         install_requires += ['argparse']
     setup(
         description='virtualenv-based automation of test activities',
         long_description=long_description,
         url='http://codespeak.net/tox',
-        version='1.4.dev7',
+        version='1.4.dev8',
         license='GPLv2 or later',
         platforms=['unix', 'linux', 'osx', 'cygwin', 'win32'],
         author='holger krekel',
     )
 
 if __name__ == '__main__':
-    main()
+    main()

tests/test_config.py

         py.test.raises(tox.exception.ConfigError, 'reader.getbool("section", "key5")')
 
 class TestConfigTestEnv:
+    def test_commentchars_issue33(self, tmpdir, newconfig):
+        config = newconfig("""
+            [testenv] # hello
+            deps = http://abc#123
+            commands=
+                python -c "x ; y"
+        """)
+        envconfig = config.envconfigs["python"]
+        assert envconfig.deps[0].name == "http://abc#123"
+        assert envconfig.commands[0] == ["python", "-c", "x ; y"]
+
     def test_defaults(self, tmpdir, newconfig):
         config = newconfig("""
             [testenv]
 #
-__version__ = '1.4.dev7'
+__version__ = '1.4.dev8'
 
 class exception:
     class Error(Exception):
 
 """
 
-__version__ = '1.4.dev7'
+__version__ = '1.4.dev8'
 
 import sys
 import os