From hpk at trillke.net Thu Jun 15 06:27:46 2006 From: hpk at trillke.net (holger krekel) Date: Thu, 15 Jun 2006 06:27:46 +0200 Subject: [py-dev] Minor typo In-Reply-To: <9A1F0FA9BF088D71A7565429@[192.168.1.100]> References: <9A1F0FA9BF088D71A7565429@[192.168.1.100]> Message-ID: <20060615042746.GT25313@solar.trillke> Hello Bruce, thanks for your nice feedback! The typo is fixed (and i think i often do this typo, btw :) best, holger On Sat, Jun 10, 2006 at 20:10 -0400, Bruce Webber wrote: > Holger, > > First, let me thank you for providing the excellent py.test tool and the > excellent documentation that goes along with it! I'm using py.test to unit > test an open source flashcard program I'm writing, and was referring to > your documentation at . > > I came across a minor typo in the table of contents and in the section > heading which reads: > > "2.2 how to write assertions about execptions" > > "execptions" should be spelled "exceptions". > > Regards, > > -- > Bruce Webber > brucewebber at fastmail.us > http://brucewebber.us > -- merlinux GmbH Steinbergstr. 42 31139 Hildesheim http://merlinux.de tel +49 5121 20800 75 (fax 77) From gry at ll.mit.edu Wed Jun 21 20:02:23 2006 From: gry at ll.mit.edu (George Young) Date: Wed, 21 Jun 2006 14:02:23 -0400 Subject: [py-dev] newbie crash, no attribute 'getimportname', rev 29094 Message-ID: <20060621140223.e29add46.gry@ll.mit.edu> [python 2.4.1, py "Checked out revision 29094"] {first time user of py.test} I just fetched revision 29094. I did [as root] python ./setup.py build python ./setup.py install All seemed well. Then cat >foo.py def test_h(): h = 0 assert h == 1 and py.test foo.py I get: Traceback (most recent call last): File "/usr/local/bin/py.test", line 4, in ? py.test.cmdline.main() File "/usr/local/lib/python2.4/site-packages/py/test/cmdline.py", line 17, in main failures = session.main(args) File "/usr/local/lib/python2.4/site-packages/py/test/terminal/terminal.py", line 34, in main return super(TerminalSession, self).main(args) File "/usr/local/lib/python2.4/site-packages/py/test/session.py", line 43, in main colitems = self._map2colitems(args) File "/usr/local/lib/python2.4/site-packages/py/test/session.py", line 142, in _map2colitems colitems.append(getfscollector(item)) File "/usr/local/lib/python2.4/site-packages/py/test/collect.py", line 49, in getfscollector current = current.join(name) File "/usr/local/lib/python2.4/site-packages/py/test/collect.py", line 250, in join x = super(Directory, self).join(name) File "/usr/local/lib/python2.4/site-packages/py/test/collect.py", line 206, in join self._prepare() File "/usr/local/lib/python2.4/site-packages/py/test/collect.py", line 186, in _prepare self._name2items = self.buildname2items() File "/usr/local/lib/python2.4/site-packages/py/test/collect.py", line 236, in buildname2items x = self.makeitem(p.basename, self.filefilter, self.recfilter) File "/usr/local/lib/python2.4/site-packages/py/test/collect.py", line 246, in makeitem Directory = py.test.Config.getvalue('Directory', p) File "/usr/local/lib/python2.4/site-packages/py/test/config.py", line 48, in getvalue mod = importconfig(p) File "/usr/local/lib/python2.4/site-packages/py/test/config.py", line 209, in importconfig return configpath.pyimport() File "/usr/local/lib/python2.4/site-packages/py/path/local/local.py", line 372, in pyimport modname = pkg.__package__.getimportname(self) AttributeError: 'Package' object has no attribute 'getimportname' What am I doing wrong? I tried explicitly putting the checkout directory in my PYTHONPATH; same result. I see that getimportname is defined in py/initpkg.py, but it's not clear to me when/how it's supposed to get run. -- George -- "Are the gods not just?" "Oh no, child. What would become of us if they were?" (C.S. Lewis) From hpk at trillke.net Thu Jun 22 09:35:22 2006 From: hpk at trillke.net (holger krekel) Date: Thu, 22 Jun 2006 09:35:22 +0200 Subject: [py-dev] newbie crash, no attribute 'getimportname', rev 29094 In-Reply-To: <20060621140223.e29add46.gry@ll.mit.edu> References: <20060621140223.e29add46.gry@ll.mit.edu> Message-ID: <20060622073522.GB5737@solar.trillke> Hi George, On Wed, Jun 21, 2006 at 14:02 -0400, George Young wrote: > [python 2.4.1, py "Checked out revision 29094"] > {first time user of py.test} > > I just fetched revision 29094. I did [as root] > python ./setup.py build > python ./setup.py install > All seemed well. > > Then cat >foo.py > def test_h(): > h = 0 > assert h == 1 > > and > py.test foo.py > > I get: > Traceback (most recent call last): I did a bit of investigation - is it so that your test_foo.py resides in a directory with many more files/directories in it? Does the problem persist if you put test_foo.py in a clean new directory? I think there is a somewhat intricate problem with the "auto detection" of test modules and directories which can result to your prescribed problem (i could reproduce it and putting test_foo.py in a separate directory resolved it - no real solution but hopefully it helps already enough for your case). best, holger From Raghu at syncsort.com Sun Jun 25 22:04:47 2006 From: Raghu at syncsort.com (Devarakonda, Raghuram) Date: Sun, 25 Jun 2006 16:04:47 -0400 Subject: [py-dev] py.test with jython Message-ID: Hi, Has anyone been able to make py.test work with jython? I will give it a try myself but I wanted to know if others already tried it. Thanks, Raghu. ps. Please cc to my email-id as I am not subscribed to the list. -------------- next part -------------- An HTML attachment was scrubbed... URL: From cfbolz at gmx.de Sun Jun 25 23:01:24 2006 From: cfbolz at gmx.de (Carl Friedrich Bolz) Date: Sun, 25 Jun 2006 23:01:24 +0200 Subject: [py-dev] py.test with jython In-Reply-To: References: Message-ID: <348899050606251401y3fc19c15s7d9b0e31d246823b@mail.gmail.com> Hi Raghu, 2006/6/25, Devarakonda, Raghuram : > Has anyone been able to make py.test work with jython? I will give it a try > myself but I wanted to know if others already tried it. I don't think anybody has tried and somehow I doubt that it works (at least until a new Jython version comes out), since py.test uses new style classes in lots of places. I guess the (hopefully coming soon :-) new version of Jython that has new style classes should be able to run it, since the py-lib is supposed to be python 2.2 compatible. Cheers, Carl Friedrich From Raghu at syncsort.com Mon Jun 26 02:36:34 2006 From: Raghu at syncsort.com (Devarakonda, Raghuram) Date: Sun, 25 Jun 2006 20:36:34 -0400 Subject: [py-dev] py.test with jython Message-ID: Hi Carl, Thanks for quick response. I am curious whether you are referring to Jython 2.1 while mentioning new style classes. I am going to use Jython-2.2a1 whose README does mention new-style classes as one of the changes. Thanks, Raghu. -----Original Message----- From: cfbolz at googlemail.com on behalf of Carl Friedrich Bolz Sent: Sun 6/25/2006 5:01 PM To: Devarakonda, Raghuram Cc: py-dev at codespeak.net Subject: Re: [py-dev] py.test with jython Hi Raghu, 2006/6/25, Devarakonda, Raghuram : > Has anyone been able to make py.test work with jython? I will give it a try > myself but I wanted to know if others already tried it. I don't think anybody has tried and somehow I doubt that it works (at least until a new Jython version comes out), since py.test uses new style classes in lots of places. I guess the (hopefully coming soon :-) new version of Jython that has new style classes should be able to run it, since the py-lib is supposed to be python 2.2 compatible. Cheers, Carl Friedrich -------------- next part -------------- An HTML attachment was scrubbed... URL: From cfbolz at gmx.de Mon Jun 26 09:30:44 2006 From: cfbolz at gmx.de (Carl Friedrich Bolz) Date: Mon, 26 Jun 2006 09:30:44 +0200 Subject: [py-dev] py.test with jython In-Reply-To: References: Message-ID: <348899050606260030i5dc4e9d9ga75c232e18f6f164@mail.gmail.com> Hi Raghu, 2006/6/26, Devarakonda, Raghuram : > I am curious whether you are referring to Jython 2.1 while mentioning new > style classes. I am going to use Jython-2.2a1 whose README does mention > new-style classes as one of the changes. Ah, cool, I didn't know that there was an alpha of the newest Jython, I was indeed referring to Jython 2.1. It would be great if you could report any problems with py.test on Jython 2.2 that you are having if you try it out. Cheers, Carl Friedrich From hpk at trillke.net Mon Jun 26 09:33:11 2006 From: hpk at trillke.net (holger krekel) Date: Mon, 26 Jun 2006 09:33:11 +0200 Subject: [py-dev] py.test with jython In-Reply-To: <348899050606260030i5dc4e9d9ga75c232e18f6f164@mail.gmail.com> References: <348899050606260030i5dc4e9d9ga75c232e18f6f164@mail.gmail.com> Message-ID: <20060626073311.GF5737@solar.trillke> Hi Raghu, On Mon, Jun 26, 2006 at 09:30 +0200, Carl Friedrich Bolz wrote: > 2006/6/26, Devarakonda, Raghuram : > > I am curious whether you are referring to Jython 2.1 while mentioning new > > style classes. I am going to use Jython-2.2a1 whose README does mention > > new-style classes as one of the changes. > > Ah, cool, I didn't know that there was an alpha of the newest Jython, > I was indeed referring to Jython 2.1. It would be great if you could > report any problems with py.test on Jython 2.2 that you are having if > you try it out. I guess that you probably have to say "--nomagic" as the "assert expression" reinterpretation presumes parser structures that likely are not present on Jython (but not 100% sure about it). best, holger From raghu at syncsort.com Mon Jun 26 17:37:49 2006 From: raghu at syncsort.com (Raghuram Devarakonda) Date: Mon, 26 Jun 2006 11:37:49 -0400 Subject: [py-dev] py.test with jython In-Reply-To: <348899050606260030i5dc4e9d9ga75c232e18f6f164@mail.gmail.com> References: <348899050606260030i5dc4e9d9ga75c232e18f6f164@mail.gmail.com> Message-ID: <449FFF4D.1010300@syncsort.com> Ok, I will give it a try and hopefully it works. Carl Friedrich Bolz wrote: > Hi Raghu, > > 2006/6/26, Devarakonda, Raghuram : >> I am curious whether you are referring to Jython 2.1 while mentioning >> new >> style classes. I am going to use Jython-2.2a1 whose README does mention >> new-style classes as one of the changes. > > Ah, cool, I didn't know that there was an alpha of the newest Jython, > I was indeed referring to Jython 2.1. It would be great if you could > report any problems with py.test on Jython 2.2 that you are having if > you try it out. > > Cheers, > > Carl Friedrich > From raghu at syncsort.com Tue Jun 27 15:13:40 2006 From: raghu at syncsort.com (Raghuram Devarakonda) Date: Tue, 27 Jun 2006 09:13:40 -0400 Subject: [py-dev] py.test with jython 22 Message-ID: <44A12F04.40903@syncsort.com> Hi, I am trying py.test with jython22 and I got the following error: marvin:pytest-test$ jython22 ~/pytest/py-dist/py/bin/py.test --nomagic inserting into sys.path: /home/raghu/pytest/py-dist Traceback (innermost last): File "/home/raghu/pytest/py-dist/py/bin/py.test", line 3, in ? File "/home/raghu/pytest/py-dist/py/bin/_findpy.py", line 34, in ? File "c:\Rags\pytest\py-dist\py\__init__.py", line 125, in ? File "c:\Rags\pytest\py-dist\py\initpkg.py", line 225, in initpkg File "c:\Rags\pytest\py-dist\py\initpkg.py", line 47, in __init__ TypeError: _new_impl(): expected 2 args; got 1 Any idea what might be wrong? Thanks, Raghu