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

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Wed Jan 22 14:46:25 CET 2014


2 new commits in pytest:

https://bitbucket.org/hpk42/pytest/commits/77925d29cf0b/
Changeset:   77925d29cf0b
Branch:      py2_pkg_skip
User:        pelme
Date:        2014-01-22 14:32:22
Summary:     fixed issue428: Skip test for packages without __init__.py on Python 2
Affected #:  1 file

diff -r 7e50e96912a21240cc8dcd65a3c1fcf2e0b9cd6c -r 77925d29cf0bd3d7e87255e3c69739e28dba621f testing/test_assertrewrite.py
--- a/testing/test_assertrewrite.py
+++ b/testing/test_assertrewrite.py
@@ -411,6 +411,13 @@
         testdir.tmpdir.join("test_newlines.py").write(b, "wb")
         assert testdir.runpytest().ret == 0
 
+    @pytest.mark.skipif(sys.version_info[0] == 2,
+                        reason='packages without __init__.py not supported on python 2')
+    def test_package_without__init__py(self, testdir):
+        pkg = testdir.mkdir('a_package_without_init_py')
+        mod = pkg.join('module.py').ensure()
+        testdir.makepyfile("import a_package_without_init_py.module")
+        assert testdir.runpytest().ret == 0
 
 class TestAssertionRewriteHookDetails(object):
     def test_loader_is_package_false_for_module(self, testdir):


https://bitbucket.org/hpk42/pytest/commits/97806c888bae/
Changeset:   97806c888bae
User:        hpk42
Date:        2014-01-22 14:46:22
Summary:     Merged in pelme/pytest/py2_pkg_skip (pull request #107)

fixed issue428: Skip test for packages without __init__.py on Python 2
Affected #:  1 file

diff -r e9d4d4eb38c195bc3913baca20c1b17e4f93c43a -r 97806c888bae964d7cc0549eb575b12bffce89f7 testing/test_assertrewrite.py
--- a/testing/test_assertrewrite.py
+++ b/testing/test_assertrewrite.py
@@ -411,6 +411,13 @@
         testdir.tmpdir.join("test_newlines.py").write(b, "wb")
         assert testdir.runpytest().ret == 0
 
+    @pytest.mark.skipif(sys.version_info[0] == 2,
+                        reason='packages without __init__.py not supported on python 2')
+    def test_package_without__init__py(self, testdir):
+        pkg = testdir.mkdir('a_package_without_init_py')
+        mod = pkg.join('module.py').ensure()
+        testdir.makepyfile("import a_package_without_init_py.module")
+        assert testdir.runpytest().ret == 0
 
 class TestAssertionRewriteHookDetails(object):
     def test_loader_is_package_false_for_module(self, testdir):

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.


More information about the pytest-commit mailing list