Skip to content

Commit d90ca24

Browse files
author
Johannes Otepka
committed
minor cleanup (necessary code removed)
1 parent e7d721a commit d90ca24

2 files changed

Lines changed: 0 additions & 22 deletions

File tree

ipyparallel/controller/sqlitedb.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
# Distributed under the terms of the Modified BSD License.
55
import json
66
import os
7-
import re
87

98
try:
109
import cPickle as pickle
@@ -100,12 +99,6 @@ def _convert_timestamp(s):
10099
return ensure_timezone(dateutil_parse(s))
101100

102101

103-
def _regexp(expr, item):
104-
"""sqlite callback function for performing a regex operation"""
105-
reg = re.compile(expr)
106-
return reg.match(item) is not None
107-
108-
109102
# -----------------------------------------------------------------------------
110103
# SQLiteDB class
111104
# -----------------------------------------------------------------------------
@@ -279,7 +272,6 @@ def _init_db(self):
279272
# isolation_level = None)#,
280273
cached_statements=64,
281274
)
282-
self._db.create_function("REGEXP", 2, _regexp)
283275
# print dir(self._db)
284276
first_table = previous_table = self.table
285277
i = 0

ipyparallel/tests/test_db.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -173,20 +173,6 @@ def test_find_records_glob(self):
173173
found = [r['msg_id'] for r in recs]
174174
assert set(ref) == set(found)
175175

176-
# hist = self.db.get_history()
177-
#
178-
# pattern = "*" + hist[0][5:-2] + "_?"
179-
# ref = [msg_id for msg_id in hist if fnmatch.fnmatch(msg_id, pattern)]
180-
# recs = self.db.find_records({'msg_id': {'$glob': pattern}}, ["msg_id"])
181-
# found = [r['msg_id'] for r in recs]
182-
# assert set(ref) == set(found)
183-
#
184-
# pattern = "*_1?"
185-
# ref = [msg_id for msg_id in hist if fnmatch.fnmatch(msg_id, pattern)]
186-
# recs = self.db.find_records({'msg_id': {'$glob': pattern}}, ["msg_id"])
187-
# found = [r['msg_id'] for r in recs]
188-
# assert set(ref) == set(found)
189-
190176
def test_get_history(self):
191177
msg_ids = self.db.get_history()
192178
latest = datetime(1984, 1, 1).replace(tzinfo=utc)

0 commit comments

Comments
 (0)