Skip to content

Commit

Permalink
assert that duplicate symbols are not present
Browse files Browse the repository at this point in the history
  • Loading branch information
sb2nov committed Jul 15, 2013
1 parent f827507 commit 4dcc098
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion qstkutil/DataEvolved.py
Expand Up @@ -216,7 +216,11 @@ def get_data_hard_read(self, ts_list, symbol_list, data_item, verbose=False, inc
@note: If a symbol is not found all the values in the column for that stock will be NaN. Execution then
continues as usual. No errors are raised at the moment.
"""


# Validate timestamps and symbol list
assert len(symbol_list) == len(set(symbol_list)), "Duplicate symbols"
assert len(ts_list) == len(set(ts_list)), "Duplicate timestamps"

self._connect()
try:
columns_tech = []
Expand Down

0 comments on commit 4dcc098

Please sign in to comment.