Unit testing on win32 with FAT requires patch to custom_zodb.py, is this a known issue?
Hello: In order to use the unit testing facility for my custom Zope Products under FAT in win32, I had to do the following: In the file name:: [ZOPE]\lib\python\Testing\custom_zodb.py Where ZOPE stands for the directory in which you installed Zope, Change line number seven:: Storage = DemoStorage(base=FileStorage(dfi,read_only=1), quota=(1<<20)) to instead read:: Storage = DemoStorage(base=FileStorage(dfi, read_only=0), quota=(1<<20)) My guess is that FAT does not support the read_only attribute as required. Is this a known issue? Am I missing something? Thanks very much! --Craeg
Craeg K Strong wrote:
Hello:
In order to use the unit testing facility for my custom Zope Products under FAT in win32, I had to do the following: In the file name::
[ZOPE]\lib\python\Testing\custom_zodb.py
Where ZOPE stands for the directory in which you installed Zope, Change line number seven::
Storage = DemoStorage(base=FileStorage(dfi,read_only=1), quota=(1<<20))
to instead read::
Storage = DemoStorage(base=FileStorage(dfi, read_only=0), quota=(1<<20))
My guess is that FAT does not support the read_only attribute as required.
Is this a known issue? Am I missing something?
No, this is not a known issue. Could you provide a traceback? Shane
Shane Hathaway wrote:
No, this is not a known issue. Could you provide a traceback?
Traceback (most recent call last): File "testStripogram.py", line 103, in ? import Zope File "D:\ZOPE\25228D~1.1\lib\python\Zope\__init__.py", line 40, in ? m=imp.load_module('Zope.custom_zodb', m[0], m[1], m[2]) File "D:\ZOPE\25228D~1.1\lib\python\Testing\custom_zodb.py", line 7, in ? Storage = DemoStorage(base=FileStorage(dfi, read_only=1), quota=(1<<20)) File "D:\ZOPE\25228D~1.1\lib\python\ZODB\FileStorage.py", line 200, in __init_ _ raise ValueError, "can\'t create a read-only file" ValueError: can't create a read-only file cheers, Chris
On Thu, 29 Aug 2002, Chris Withers wrote:
Shane Hathaway wrote:
No, this is not a known issue. Could you provide a traceback?
Traceback (most recent call last): File "testStripogram.py", line 103, in ? import Zope File "D:\ZOPE\25228D~1.1\lib\python\Zope\__init__.py", line 40, in ? m=imp.load_module('Zope.custom_zodb', m[0], m[1], m[2]) File "D:\ZOPE\25228D~1.1\lib\python\Testing\custom_zodb.py", line 7, in ? Storage = DemoStorage(base=FileStorage(dfi, read_only=1), quota=(1<<20)) File "D:\ZOPE\25228D~1.1\lib\python\ZODB\FileStorage.py", line 200, in __init_ _ raise ValueError, "can\'t create a read-only file" ValueError: can't create a read-only file
Apparently the file "Data.fs.in" doesn't exist. Why? (Try adding "print dfi" to custom_zodb.py.) Shane
Shane Hathaway wrote:
raise ValueError, "can\'t create a read-only file" ValueError: can't create a read-only file
Apparently the file "Data.fs.in" doesn't exist. Why? (Try adding "print dfi" to custom_zodb.py.)
Problem found! dfi points to the right place, but for some reason, the 2.5.1 Win32 binary release doesn't actually have a Data.fs.in in it. The reason the testrunners don't barf is that the Zope-2_5-branch _does_ have a Data.fs.in in it. What on earth is going on here? cheers, Chris PS: I do remember rumblings of getting rid of Data.fs.in, perhaps this is fallout of that? How does that impact the testing package?
Hello: I was just curious as to what the status is on this. I just had to apply the patch to yet another Win2000 computer. Thanks, --Craeg Shane Hathaway wrote:
On Thu, 29 Aug 2002, Chris Withers wrote:
Shane Hathaway wrote:
No, this is not a known issue. Could you provide a traceback?
Traceback (most recent call last): File "testStripogram.py", line 103, in ? import Zope File "D:\ZOPE\25228D~1.1\lib\python\Zope\__init__.py", line 40, in ? m=imp.load_module('Zope.custom_zodb', m[0], m[1], m[2]) File "D:\ZOPE\25228D~1.1\lib\python\Testing\custom_zodb.py", line 7, in ? Storage = DemoStorage(base=FileStorage(dfi, read_only=1), quota=(1<<20)) File "D:\ZOPE\25228D~1.1\lib\python\ZODB\FileStorage.py", line 200, in __init_ _ raise ValueError, "can\'t create a read-only file" ValueError: can't create a read-only file
Apparently the file "Data.fs.in" doesn't exist. Why? (Try adding "print dfi" to custom_zodb.py.)
Shane
Craeg K Strong wrote:
I was just curious as to what the status is on this. I just had to apply the patch to yet another Win2000 computer. Thanks,
Well, whoever packages the Win32 binaries needs to re-package them properly. OR we need to be told that Data.fs.in should no longer be used. In which case, we need to change the testing package. cheers, Chris
participants (3)
-
Chris Withers -
Craeg K Strong -
Shane Hathaway