Skip to content

Commit

Permalink
minor things
Browse files Browse the repository at this point in the history
  • Loading branch information
barrust committed Oct 7, 2017
1 parent 14e02f6 commit 02e202e
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* Basic functionality: add, remove, check
* Expand
* Import / Export
* Fix and tests for utility functions

### Version 0.1.1:
* CuckooFilter
Expand Down
2 changes: 1 addition & 1 deletion probables/cuckoo/countingcuckoo.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from struct import (pack, unpack, calcsize)

from . cuckoo import (CuckooFilter)
from .. exceptions import (CuckooFilterFullError, NotSupportedError)
from .. exceptions import (CuckooFilterFullError)


class CountingCuckooFilter(CuckooFilter):
Expand Down
4 changes: 2 additions & 2 deletions tests/countingcuckoo_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ def test_c_cuckoo_full_msg(self):
self.assertEqual(True, False)

def test_c_cuckoo_idx(self):
''' test that the indexing works correctly for counting cuckoo filter swap '''
''' test that the indexing works correctly for counting cuckoo filter
swap '''
cko = CountingCuckooFilter(capacity=100, bucket_size=2, max_swaps=5)
txt = 'this is a test'
idx_1, idx_2, fingerprint = cko._generate_fingerprint_info(txt)
Expand Down Expand Up @@ -239,7 +240,6 @@ def test_c_cuckoo_filter_bin(self):
self.assertEqual('[(fingerprint:3057276164 count:1)]',
str(cko.buckets[0]))


def test_c_cuckoo_filter_str(self):
''' test the str representation of the counting cuckoo filter '''
cko = CountingCuckooFilter(capacity=100, bucket_size=2, max_swaps=100)
Expand Down
2 changes: 2 additions & 0 deletions tests/test_utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
from . utilities import (different_hash)
from probables.utilities import (is_hex_string, is_valid_file, get_x_bits)


class TestProbablesUtilities(unittest.TestCase):
''' test the utilities for pyprobables '''

def test_is_hex(self):
''' test the is valid hex function '''
Expand Down

0 comments on commit 02e202e

Please sign in to comment.