[Pytest-commit] commit/tox: 2 new changesets

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Sat Feb 21 20:19:34 CET 2015


2 new commits in tox:

https://bitbucket.org/hpk42/tox/commits/81587bb49a77/
Changeset:   81587bb49a77
Branch:      lessen-factor-use-check
User:        suor
Date:        2014-12-29 12:09:15+00:00
Summary:     Lessen factor use check

Fixes issue 191
Affected #:  2 files

diff -r 50f3b98fc65b951ab07e6b5e3fbd5a2fc9c48f2c -r 81587bb49a7706a661fa925dea0eae192118238b tests/test_config.py
--- a/tests/test_config.py
+++ b/tests/test_config.py
@@ -960,6 +960,18 @@
         assert configs["py27"].setenv["X"] == "1"
         assert "X" not in configs["py26"].setenv
 
+    @pytest.mark.issue191
+    def test_factor_use_not_checked(self, newconfig):
+        inisource="""
+            [tox]
+            envlist = py27-{a,b}
+
+            [testenv]
+            deps = b: test
+        """
+        configs = newconfig([], inisource).envconfigs
+        assert set(configs.keys()) == set(['py27-a', 'py27-b'])
+
     def test_period_in_factor(self, newconfig):
         inisource="""
             [tox]

diff -r 50f3b98fc65b951ab07e6b5e3fbd5a2fc9c48f2c -r 81587bb49a7706a661fa925dea0eae192118238b tox/_config.py
--- a/tox/_config.py
+++ b/tox/_config.py
@@ -287,10 +287,18 @@
 
         config.envlist, all_envs = self._getenvdata(reader, toxsection)
 
-        # configure testenvs
+        # factors used in config or predefined
         known_factors = self._list_section_factors("testenv")
         known_factors.update(default_factors)
         known_factors.add("python")
+
+        # factors stated in config envlist
+        stated_envlist = reader.getdefault(toxsection, "envlist", replace=False)
+        if stated_envlist:
+            for env in _split_env(stated_envlist):
+                known_factors.update(env.split('-'))
+
+        # configure testenvs
         for name in all_envs:
             section = testenvprefix + name
             factors = set(name.split('-'))


https://bitbucket.org/hpk42/tox/commits/0ebe9e55e8c2/
Changeset:   0ebe9e55e8c2
User:        hpk42
Date:        2015-02-21 19:19:31+00:00
Summary:     Merged in suor/tox/lessen-factor-use-check (pull request #130)

Lessen factor use check
Affected #:  2 files

diff -r 4298877e42165fcc80bccd1cc809583f8178c301 -r 0ebe9e55e8c2e010ddc7e4b10603e3ee0db56a9f tests/test_config.py
--- a/tests/test_config.py
+++ b/tests/test_config.py
@@ -960,6 +960,18 @@
         assert configs["py27"].setenv["X"] == "1"
         assert "X" not in configs["py26"].setenv
 
+    @pytest.mark.issue191
+    def test_factor_use_not_checked(self, newconfig):
+        inisource="""
+            [tox]
+            envlist = py27-{a,b}
+
+            [testenv]
+            deps = b: test
+        """
+        configs = newconfig([], inisource).envconfigs
+        assert set(configs.keys()) == set(['py27-a', 'py27-b'])
+
     def test_period_in_factor(self, newconfig):
         inisource="""
             [tox]

diff -r 4298877e42165fcc80bccd1cc809583f8178c301 -r 0ebe9e55e8c2e010ddc7e4b10603e3ee0db56a9f tox/_config.py
--- a/tox/_config.py
+++ b/tox/_config.py
@@ -287,10 +287,18 @@
 
         config.envlist, all_envs = self._getenvdata(reader, toxsection)
 
-        # configure testenvs
+        # factors used in config or predefined
         known_factors = self._list_section_factors("testenv")
         known_factors.update(default_factors)
         known_factors.add("python")
+
+        # factors stated in config envlist
+        stated_envlist = reader.getdefault(toxsection, "envlist", replace=False)
+        if stated_envlist:
+            for env in _split_env(stated_envlist):
+                known_factors.update(env.split('-'))
+
+        # configure testenvs
         for name in all_envs:
             section = testenvprefix + name
             factors = set(name.split('-'))

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