Skip to content

Commit

Permalink
test map picklability. add map to top level
Browse files Browse the repository at this point in the history
  • Loading branch information
mrocklin committed Apr 21, 2016
1 parent 81883a5 commit c190a89
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions s3fs/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from .core import S3FileSystem, S3File
from .mapping import S3Map

__version__ = '0.0.4'
10 changes: 10 additions & 0 deletions s3fs/tests/test_mapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,13 @@ def test_complex_keys(s3):
print(list(mw))

assert ('x', 1, 2) in mw


def test_pickle(s3):
d = S3Map(s3, root)
d['x'] = b'1'

import pickle
d2 = pickle.loads(pickle.dumps(d))

assert d2['x'] == b'1'

0 comments on commit c190a89

Please sign in to comment.