barneygale / quarry

Python library that implements the Minecraft network protocol and data types
Other
532 stars 74 forks source link

tests and the ability to unpack block posses #10

Closed aaps closed 9 years ago

aaps commented 9 years ago

He Barney could you check this out, and tell me this is the format you could use. Also i would be helped with the ability to read chunk data, failing at that !

aaps commented 9 years ago

since the locations code is not usefull i will close this one and make only the tests.

barneygale commented 9 years ago

Yo! Sorry I didn't see this earlier. The methods for packing/unpacking block positions look useful, thanks for that. A couple of things:

  1. I've written some tests already, and intend to push them tonight. These are written using py.test style, rather than unittest. Could you hang on for that commit, then rebase your tests off that?
  2. The tests should be checking pack/unpack in isolation against test vectors (i.e. byte strings we know to be correct). Checking that data == pack(unpack(data)) is not a good test!