Skip to content

Commit

Permalink
BUG: Correctly test for duplicate symbols
Browse files Browse the repository at this point in the history
  • Loading branch information
StewartDouglas committed Oct 1, 2015
1 parent 39fff4a commit 8ba15a6
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions tests/test_assets.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,14 @@ def build_lookup_generic_cases():
[
{
'sid': 0,
'symbol': 'duplicated_0',
'symbol': 'duplicated',
'start_date': dupe_0_start.value,
'end_date': dupe_0_end.value,
'exchange': '',
},
{
'sid': 1,
'symbol': 'duplicated_1',
'symbol': 'duplicated',
'start_date': dupe_1_start.value,
'end_date': dupe_1_end.value,
'exchange': '',
Expand Down Expand Up @@ -109,8 +109,8 @@ def build_lookup_generic_cases():
(finder, 1, None, assets[1]),
(finder, 2, None, assets[2]),
# Duplicated symbol with resolution date
(finder, 'duplicated_0', dupe_0_start, dupe_0),
(finder, 'duplicated_1', dupe_1_start, dupe_1),
(finder, 'duplicated', dupe_0_start, dupe_0),
(finder, 'duplicated', dupe_1_start, dupe_1),
# Unique symbol, with or without resolution date.
(finder, 'unique', unique_start, unique),
(finder, 'unique', None, unique),
Expand All @@ -125,11 +125,11 @@ def build_lookup_generic_cases():
(finder, (0, 1), None, assets[:-1]),
(finder, iter((0, 1)), None, assets[:-1]),
# Iterables of symbols.
(finder, ('duplicated_0', 'unique'), dupe_0_start, [dupe_0, unique]),
(finder, ('duplicated_1', 'unique'), dupe_1_start, [dupe_1, unique]),
(finder, ('duplicated', 'unique'), dupe_0_start, [dupe_0, unique]),
(finder, ('duplicated', 'unique'), dupe_1_start, [dupe_1, unique]),
# Mixed types
(finder,
('duplicated_0', 2, 'unique', 1, dupe_1),
('duplicated', 2, 'unique', 1, dupe_1),
dupe_0_start,
[dupe_0, assets[2], unique, assets[1], dupe_1]),
]
Expand Down

0 comments on commit 8ba15a6

Please sign in to comment.