Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/uqfoundation/dill into ne…
Browse files Browse the repository at this point in the history
…w_file_handling

Conflicts:
	tests/test_file.py
  • Loading branch information
matsjoyce committed Aug 21, 2014
2 parents b435bb7 + 5ff7e22 commit 11bd4b3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dill/dill.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,8 @@ def ndarrayinstance(obj): return False
ExitType = None # IPython.core.autocall.ExitAutocall
singletontypes = ['exit', 'quit', 'get_ipython']
except NameError:
ExitType = type(exit)
try: ExitType = type(exit) # apparently 'exit' can be removed
except NameError: ExitType = None
singletontypes = []

### File modes
Expand Down
2 changes: 2 additions & 0 deletions tests/test_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,7 @@ def test(safe_file, file_mode):
f2tell = f2.tell()
f2.write(" world!")
f2.close()

if file_mode == dill.FMODE_PRESERVEDATA:
assert open(fname).read() == " world!"
assert f2mode == 'w+'
Expand Down Expand Up @@ -330,6 +331,7 @@ def test(safe_file, file_mode):
f2.write(" world!")
f2.close()
assert f2mode == fmode

if file_mode == dill.FMODE_PRESERVEDATA:
assert open(fname).read() == " world!"
assert f2tell == 0
Expand Down

0 comments on commit 11bd4b3

Please sign in to comment.