[Verse-dev] Weird address size bug

Emil Brink emil at obsession.se
Thu Jul 20 18:42:17 CEST 2006


Justizin wrote:
> I wonder if there are unit tests on pyverse which could help maintain
> the expected functionality of bits like this, or if there could be. ;)

Good question. I guess such tests, if they existed, would have to be
at the direct Verse level, not across the abyss over to Python-land.

Even so, I'm not sure I can figure out a way to a unit test framework for
code like this, and even less sure Eskil (who designed the code in question)
is interested in providing the actual tests ... Not sure though, it's not
something we've talked about.

I've had the concept of unit tests nagging in the back of my head for quite
a while, since Verse could really use that kind of automated verification.
Unfortunately, I haven't figured out how to do them in general for something
as context-dependent as the Verse protocol. For instance, to test that the
server code for setting a binary ("blob") tag works, you would need to
connect with a client that:

1) Creates a new node (or uses its avatar)
2) Subscribes to it
3) Creates a new tag group
4) Subscribes to it
5) Creates a blob tag with some data in it
6) Waits for the confirm by the server, and compares the data

At that point, you would be reasonable sure that the server has at least
mirrored the data properly, but it might still store it incorrectly, so
further tests would have to be designed for that.

Of course, this is also rather high-level; the code that I showed in the
beginning of this thread is not visible in the Verse API, it's a very
internal function. Of course tests could be designed for those as well,
and it might even be easier.

If someone were to step forward and volunteer, I would provide some
serious applause, free of charge. ;)

Regards,

/Emil



More information about the Verse-dev mailing list