jaybaird / python-bloomfilter

Scalable Bloom Filter implemented in Python
MIT License
1.62k stars 330 forks source link

Unit-tests fail on windows #24

Open jaytaylor opened 8 years ago

jaytaylor commented 8 years ago

I tested on Linux and they work fine.

But on windows the bitarray library throws an exception:

======================================================================
ERROR: test_serialization (pybloom.tests.Serialization)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "c:\users\taylor\src\python-bloomfilter\pybloom\tests.py", line 92, in test_serialization
    filter.tofile(f)
  File "c:\users\taylor\src\python-bloomfilter\pybloom\pybloom.py", line 251, in tofile
    else self.bitarray.tofile(f))
TypeError: open file expected

----------------------------------------------------------------------
Ran 14 tests in 0.391s

FAILED (errors=1)

Even though the file is definitely open:

<open file '<fdopen>', mode 'w+b' at 0x0000000003291420>

I realize this isn't a bug in the pybloom library, but I am filing it here since the UT's do not pass on windows.