Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add import indent #74

Merged
merged 1 commit into from Dec 30, 2015
Merged

Conversation

femtotrader
Copy link
Contributor

Try to fix #49

@jamesblackburn
Copy link
Contributor

Thanks! Will need a unit test too which exercises the broken code

@femtotrader femtotrader force-pushed the fix49_str_tick_lib branch 4 times, most recently from 7ca11dc to 776f656 Compare December 28, 2015 17:53
@femtotrader
Copy link
Contributor Author

It should be ok... Please tell me is something is missing

@bmoscon
Copy link
Collaborator

bmoscon commented Dec 30, 2015

You need to add a unit test for the broken code. The test should fail without your fix and pass with it.

@femtotrader
Copy link
Contributor Author

This is the case

see test_stringify_tickstore_library

# Fix GH issue 49 - str(tick library) fails in IPython
store = Arctic(mongo_host=mongo_host)
store.initialize_library('library_name', 'TickStoreV3')
s = str(store['library_name'])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

assert 'arctic.library_name' in str(store['library_name']) would be nicer

@AdrianTeng
Copy link
Contributor

LGTM

@femtotrader
Copy link
Contributor Author

assert 'arctic.library_name' in str(store['library_name'])

added and commits squashed

AdrianTeng added a commit that referenced this pull request Dec 30, 2015
@AdrianTeng AdrianTeng merged commit d20200f into man-group:master Dec 30, 2015
@@ -144,3 +144,9 @@ def test_default_mongo_retry_timout():
with pytest.raises(LibraryNotFoundException):
Arctic('unresolved-host', serverSelectionTimeoutMS=0)['some.lib']
assert time.time() - now < 1.

def test_stringify_tickstore_library(mongo_host):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test should really live on a test file with the sae name as the module under test. test_tickstore.py or similar...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry @jamesblackburn ... @AdrianTeng merged it ... do you want I move this test or will you do it ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll do it

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you make it a unit test, too :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

str(tick library) fails in IPython
4 participants