[Pytest-commit] commit/tox: 2 new changesets
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Mon May 6 09:58:12 CEST 2013
2 new commits in tox:
https://bitbucket.org/hpk42/tox/commits/45bfbce11300/
Changeset: 45bfbce11300
User: kfekete
Date: 2013-05-06 00:31:31
Summary: Test for #99 regression on multiple substitutions per line
Affected #: 1 file
diff -r 1aadfbd68cfff77e57ef36ffb8ec5a54b40217d8 -r 45bfbce1130042a5f3b0794cbf051539603534cd tests/test_config.py
--- a/tests/test_config.py
+++ b/tests/test_config.py
@@ -806,6 +806,20 @@
assert config.indexserver["default"].url == "xzy"
assert config.indexserver["name1"].url == "xzy"
+ def test_multiple_homedir_relative_local_indexservers(self, newconfig):
+ inisource = """
+ [tox]
+ indexserver =
+ default = file://{homedir}/.pip/downloads/simple
+ local1 = file://{homedir}/.pip/downloads/simple
+ local2 = file://{toxinidir}/downloads/simple
+ pypi = http://pypi.python.org/simple
+ """
+ config = newconfig([], inisource)
+ homedir = str(py.path.local._gethomedir())
+ assert config.indexserver['default'].url == "file://{h}/.pip/downloads/simple".format(h=homedir)
+ assert config.indexserver['local1'].url == config.indexserver['default'].url
+
class TestParseEnv:
def test_parse_recreate(self, newconfig):
https://bitbucket.org/hpk42/tox/commits/8dd1345f8c32/
Changeset: 8dd1345f8c32
User: kfekete
Date: 2013-05-06 00:31:32
Summary: Fix #99 regression - modify regular expression to be non-greedy
Affected #: 1 file
diff -r 45bfbce1130042a5f3b0794cbf051539603534cd -r 8dd1345f8c327a471adc09695823df668f9e23a4 tox/_config.py
--- a/tox/_config.py
+++ b/tox/_config.py
@@ -345,8 +345,15 @@
self.name = name
self.url = url
-RE_ITEM_REF = re.compile(r'\{(?:(?P<sub_type>[^[:]+):)?(?P<substitution_value>.*)\}')
-# temporary workaround for sublime text syntax highlight bug: ]))'
+RE_ITEM_REF = re.compile(
+ '''
+ [{]
+ (?:(?P<sub_type>[^[:{}]+):)? # optional sub_type for special rules
+ (?P<substitution_value>[^{}]*) # substitution key
+ [}]
+ ''',
+ re.VERBOSE)
+
class IniReader:
def __init__(self, cfgparser, fallbacksections=None):
Repository URL: https://bitbucket.org/hpk42/tox/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
More information about the pytest-commit
mailing list