From: Daniel F. <fet...@go...> - 2011-05-15 11:50:31
|
Hi Oleg, I'm trying to move sqlobject closer to python 3 and plan to submit a couple of patches. But before doing so I wanted to run the test suite and ran into a bit of a mess with py.test versions. With python 2.6 and py 1.1.1 I can run the tests but with python 2.7 and py 1.4.3 and py.test 2.0.3 even 'py.test --help' doesn't work: [fetchinson@fetch sqlobject]$ py.test --version Traceback (most recent call last): File "/usr/local/bin/py.test", line 8, in <module> load_entry_point('pytest==2.0.3', 'console_scripts', 'py.test')() File "/usr/local/lib/python2.7/site-packages/pytest-2.0.3-py2.7.egg/_pytest/core.py", line 457, in main pluginmanager=_pluginmanager, args=args) File "/usr/local/lib/python2.7/site-packages/pytest-2.0.3-py2.7.egg/_pytest/core.py", line 412, in __call__ return self._docall(methods, kwargs) File "/usr/local/lib/python2.7/site-packages/pytest-2.0.3-py2.7.egg/_pytest/core.py", line 423, in _docall res = mc.execute() File "/usr/local/lib/python2.7/site-packages/pytest-2.0.3-py2.7.egg/_pytest/core.py", line 341, in execute res = method(**kwargs) File "/usr/local/lib/python2.7/site-packages/pytest-2.0.3-py2.7.egg/_pytest/config.py", line 10, in pytest_cmdline_parse config.parse(args) File "/usr/local/lib/python2.7/site-packages/pytest-2.0.3-py2.7.egg/_pytest/config.py", line 337, in parse self._preparse(args) File "/usr/local/lib/python2.7/site-packages/pytest-2.0.3-py2.7.egg/_pytest/config.py", line 316, in _preparse self._setinitialconftest(args) File "/usr/local/lib/python2.7/site-packages/pytest-2.0.3-py2.7.egg/_pytest/config.py", line 295, in _setinitialconftest self._conftest.setinitial(args) File "/usr/local/lib/python2.7/site-packages/pytest-2.0.3-py2.7.egg/_pytest/config.py", line 159, in setinitial self._path2confmods[None] = self.getconftestmodules(anchor) File "/usr/local/lib/python2.7/site-packages/pytest-2.0.3-py2.7.egg/_pytest/config.py", line 185, in getconftestmodules clist.append(self.importconftest(conftestpath)) File "/usr/local/lib/python2.7/site-packages/pytest-2.0.3-py2.7.egg/_pytest/config.py", line 214, in importconftest self._conftestpath2mod[conftestpath] = mod = conftestpath.pyimport() File "/usr/local/lib/python2.7/site-packages/py-1.4.3-py2.7.egg/py/_path/local.py", line 529, in pyimport mod = __import__(modname, None, None, ['__doc__']) File "/home/fetchinson/files/python/svn/sqlobject/sqlobject/conftest.py", line 34, in <module> Option = py.test.config.Option File "/usr/local/lib/python2.7/site-packages/py-1.4.3-py2.7.egg/py/_apipkg.py", line 159, in __getattribute__ return getattr(getmod(), name) AttributeError: 'module' object has no attribute 'config' The sqlobject svn source is in /home/fetchinson/files/python/svn/sqlobject and I did a python2.7 setup.py develop in that directory (similarly with formencode). The installations are both fine, with python2.7 I can import sqlobject. With the py and py.test versions I have with python 2.6 there was only one library, 'py' and this included py.test. But with the newer versions that I have installed for python 2.7, they are separate, there is a 'py' and a 'pytest' package with different version numbers. So basically my question is what versions of the test framework 'py.test' do you use for the tests and how do you run them? I'd prefer duplicating the exact same setup as what you have and in that way there will be the least amount of friction between my patches and your work flow. Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown |
From: Oleg B. <ph...@ph...> - 2011-05-15 12:03:32
|
On Sun, May 15, 2011 at 01:50:24PM +0200, Daniel Fetchinson wrote: > So basically my question is what versions of the test framework > 'py.test' do you use for the tests I use py.test from SVN, currently at revision 80343; I think it's version 1.0.1 or 1.0.2. I can upgrade to 1.3.3 (the version in Debian 6.0). > and how do you run them? I use a number of shell scripts. Will send them to you. Oleg. -- Oleg Broytman http://phdru.name/ ph...@ph... Programmers don't die, they just GOSUB without RETURN. |
From: Daniel F. <fet...@go...> - 2011-05-15 13:48:43
|
>> So basically my question is what versions of the test framework >> 'py.test' do you use for the tests > > I use py.test from SVN, currently at revision 80343; I think it's > version 1.0.1 or 1.0.2. I can upgrade to 1.3.3 (the version in Debian 6.0). I downgraded to py-1.1.1 at which version 'py' and 'py.test' were both included in 'py'. And now things work with python 2.7 just like with python 2.6. So I guess there was some non-backward compatible change in 'py' and/or 'py.test' recently. In any case the reason I needed python 2.7 is that I can test python 3 related stuff with 2.7. >> and how do you run them? > > I use a number of shell scripts. Will send them to you. Thanks! I'll some the patches soon, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown |
From: Daniel F. <fet...@go...> - 2011-05-15 13:49:11
|
> I'll some the patches soon, s/some/send/ Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown |