Skip to content

Commit

Permalink
Merge 7d0ce97 into 5420c7c
Browse files Browse the repository at this point in the history
  • Loading branch information
The-inside-man committed Oct 26, 2021
2 parents 5420c7c + 7d0ce97 commit b7cff1a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
5 changes: 1 addition & 4 deletions optimizely/bucketer.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,7 @@

import math

try:
import mmh3
except ImportError:
from .lib import pymmh3 as mmh3
from .lib import pymmh3 as mmh3


MAX_TRAFFIC_VALUE = 10000
Expand Down
1 change: 0 additions & 1 deletion requirements/core.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
jsonschema==3.2.0
pyrsistent==0.16.0
mmh3==2.5.1
requests>=2.21
pyOpenSSL>=19.1.0
cryptography>=2.8.0
Expand Down
5 changes: 2 additions & 3 deletions tests/test_bucketing.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,14 @@
# limitations under the License.

import json
import mmh3
import mock
import random

from optimizely import bucketer
from optimizely import entities
from optimizely import logger
from optimizely import optimizely
from optimizely.lib import pymmh3
from optimizely.lib import pymmh3 as mmh3

from . import base

Expand Down Expand Up @@ -215,7 +214,7 @@ def test_hash_values(self):

for i in range(10):
random_value = str(random.random())
self.assertEqual(mmh3.hash(random_value), pymmh3.hash(random_value))
self.assertEqual(mmh3.hash(random_value), mmh3.hash(random_value))


class BucketerWithLoggingTest(base.BaseTest):
Expand Down

0 comments on commit b7cff1a

Please sign in to comment.