On the actual problem, this is a big red flag for me:
'isinstance(zapi.getSiteManager(), FiveSiteManager)': True,
Fails. So, it's not a FivesiteManager. What is it? None, or something else?
Since this seems to be a cleanup issue, my guess is: Something else.
Probably another one of the site
Lennart Regebro wrote:
On the actual problem, this is a big red flag for me:
'isinstance(zapi.getSiteManager(), FiveSiteManager)': True,
Fails. So, it's not a FivesiteManager. What is it? None, or something else?
It's the global site manager if not the FiveSiteManager.
Since this seems
[Benji York]
The Zope2 unit tests have been failing for some time on
buildbot.zope.com. Looks like a Five-related problem:
http://buildbot.zope.org/Zope%20trunk%202.4%20Linux%20zc-buildbot/builds/109/test/0
[Tres Seaver]
The failing test is a functional test, not a unit test; I don't run
Jim Fulton wrote:
This is really just a matter of knowing how to write the test.
Generally, when you want to show a dict sample, the way to do it
is with:
from zope.testing/doctestunit import pprint
pprint(thisdict)
This formats the dictionary nicely and, most importantly,
sorts the
Tim Peters wrote:
I'm not sure what it is testing, either; CC'ing Phillip, whose
fingerprints are on it, according the 'svn blame', for clarification.
These tests have always failed, and Phillip doesn't know why.
Because they were failing, he changed them to run at level 2. That's
not
[Tim]
I opened a Collector issue on this about a month ago (I always run
with `--all`, so these failures are old news to me):
http://www.zope.org/Collectors/Zope/1947
[Philipp]
Rereading that issue again, it's totally surprising to see that there's no
failure on
Windows, which makes
Tim Peters wrote:
I wouldn't know where to start (having tried to debug this problem in the
past).
Anyone got an idea?
For a start, disabuse yourself of the illusion that it acts
differently on Windows than on Linux ;-)
Yup, sorry, misread the issue. Speed kills... :)
Philipp
Philipp von Weitershausen wrote:
...
Actually, I put this particular test (functional.txt) on level=2 because
it would fail when run together with other Five tests. It passes fine
when run by itself. This test exists identically in Five 1.2 (based on
Zope 2.8) where it passes just fine when run
Jim Fulton wrote:
Obviously, some other test isn't cleaning up after itself.
Yes, that was obvious to me too. It was confusing that the same test would pass
on Five
1.2, though, and I couldn't find any obvious differences. As trial and error
usually
takes time, I left the issue to be resolved
...
[Philipp]
Well, if you look closer you find that it uses pprint.pformat which
always outputs the
same on all machines (because it provides output sorted by the
dictionary key).
[Tres Seaver]
I see that in the implementation; it isn't documented as part of
pprint's contract, however.
Tim Peters wrote:
... a good lecture on pprint vs. dicts
Thanks, I'll be more careful about using pprint for dicts then.
Philipp
This message was sent using IMP, the Internet Messaging Program.
Tim Peters wrote:
...
[Philipp]
Well, if you look closer you find that it uses pprint.pformat which
always outputs the
same on all machines (because it provides output sorted by the
dictionary key).
[Tres Seaver]
I see that in the implementation; it isn't documented as part of
[Tim]
Looks like Jim's suggested
from zope.testing.doctestunit import pprint
inherits this insecurity.
[Jim]
No, it doesn't.
from zope.testing.doctestunit import pprint
pprint({z: 1, m: 2})
{'m': 2,
'z': 1}
Note both the sorting and the wrapping.
See below.
Cool! I
Tim Peters wrote:
...
Well, I understand why that works, but it's not part of pprint's
contract either.
What contract. :)
Aren't you always telling me to read the source?
Note that, in Python 2.4, you can now pass a width to pprint without creating
a separate pretty printer:
from pprint
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Jim Fulton wrote:
Tim Peters wrote:
...
Well, I understand why that works, but it's not part of pprint's
contract either.
What contract. :)
The documented behavior, e.g. from '$ pydoc pprint' or the online
equivalent,
Tres Seaver wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Jim Fulton wrote:
Tim Peters wrote:
...
Well, I understand why that works, but it's not part of pprint's
contract either.
What contract. :)
The documented behavior, e.g. from '$ pydoc pprint' or the online
equivalent,
...
[Tim]
Well, I understand why that works, but it's not part of pprint's
contract either.
[Jim]
What contract. :)
pprint's docs.
Aren't you always telling me to read the source?
Indeed, if you hadn't, you wouldn't have known that forcing width=1
forces dict sorting ;-) It's common as
On 12/19/05, Philipp von Weitershausen [EMAIL PROTECTED] wrote:
Now I see what you mean by contract. You're right, I guess it isn't
documented then, but
perhaps it should be.
That's never been part of the contract and, as Tres notes, it's
inconsistent. The implmentation will only sort when
18 matches
Mail list logo