コード例 #1
0
ファイル: test_portfolio.py プロジェクト: trodjr/intuition
 def test__remove_useless_orders(self):
     allocation = {'goog': 34, 'aapl': -134, 'useless': 0, 'also': -0}
     new_allocation = portfolio._remove_useless_orders(allocation)
     allocation.pop('useless')
     allocation.pop('also')
     eq_(new_allocation, allocation)
コード例 #2
0
ファイル: test_portfolio.py プロジェクト: trodjr/intuition
 def test__remove_useless_orders_nothing_to_do(self):
     allocation = {'goog': 34, 'aapl': -134}
     new_allocation = portfolio._remove_useless_orders(allocation)
     eq_(new_allocation, allocation)
コード例 #3
0
ファイル: test_portfolio.py プロジェクト: trodjr/intuition
 def test__remove_useless_orders_empty_orders(self):
     allocation = {}
     new_allocation = portfolio._remove_useless_orders(allocation)
     eq_(new_allocation, {})
コード例 #4
0
 def test__remove_useless_orders(self):
     allocation = {'goog': 34, 'aapl': -134, 'useless': 0, 'also': -0}
     new_allocation = portfolio._remove_useless_orders(allocation)
     allocation.pop('useless')
     allocation.pop('also')
     eq_(new_allocation, allocation)
コード例 #5
0
 def test__remove_useless_orders_nothing_to_do(self):
     allocation = {'goog': 34, 'aapl': -134}
     new_allocation = portfolio._remove_useless_orders(allocation)
     eq_(new_allocation, allocation)
コード例 #6
0
 def test__remove_useless_orders_empty_orders(self):
     allocation = {}
     new_allocation = portfolio._remove_useless_orders(allocation)
     eq_(new_allocation, {})