Skip to content
This repository has been archived by the owner on Dec 10, 2018. It is now read-only.

Commit

Permalink
Revert "Merge pull request #168 from halfcrazy/add_unicode_test"
Browse files Browse the repository at this point in the history
This reverts commit 991b040, reversing
changes made to 144b9d6.
lxyu committed Jan 21, 2016
1 parent f6f7d2d commit b949d45
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions tests/test_hook.py
Original file line number Diff line number Diff line change
@@ -46,23 +46,6 @@ def test_load():
assert person == pickle.loads(pickle.dumps(person))


def test_load_with_unicode_module_name():
ab_1 = thriftpy.load("addressbook.thrift")
ab_2 = thriftpy.load("addressbook.thrift",
module_name=u"addressbook_thrift")

assert ab_1.__name__ == "addressbook"
assert ab_2.__name__ == "addressbook_thrift"

# load without module_name can't do pickle
with pytest.raises(pickle.PicklingError):
pickle.dumps(ab_1.Person(name='Bob'))

# load with module_name set and it can be pickled
person = ab_2.Person(name='Bob')
assert person == pickle.loads(pickle.dumps(person))


def test_load_module():
ab = thriftpy.load_module("addressbook_thrift")
assert ab.__name__ == "addressbook_thrift"

0 comments on commit b949d45

Please sign in to comment.