python-bloomfilter icon indicating copy to clipboard operation
python-bloomfilter copied to clipboard

Unit-tests fail on windows

Open jaytaylor opened this issue 8 years ago • 0 comments

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.

jaytaylor avatar Jun 18 '16 15:06 jaytaylor