forked from waditu/tushare
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
107 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# -*- coding:utf-8 -*- | ||
|
||
import unittest | ||
import tushare.stock.fundamental as fd | ||
|
||
class Test(unittest.TestCase): | ||
|
||
def set_data(self): | ||
self.code = '600848' | ||
self.start = '2015-01-03' | ||
self.end = '2015-04-07' | ||
self.year = 2014 | ||
self.quarter = 4 | ||
|
||
def test_get_stock_basics(self): | ||
print(fd.get_stock_basics()) | ||
|
||
def test_get_report_data(self): | ||
self.set_data() | ||
print(fd.get_report_data(self.year, self.quarter)) | ||
|
||
def test_get_profit_data(self): | ||
self.set_data() | ||
print(fd.get_profit_data(self.year, self.quarter)) | ||
|
||
def test_get_operation_data(self): | ||
self.set_data() | ||
print(fd.get_operation_data(self.year, self.quarter)) | ||
|
||
def test_get_growth_data(self): | ||
self.set_data() | ||
print(fd.get_growth_data(self.year, self.quarter)) | ||
|
||
def test_get_debtpaying_data(self): | ||
self.set_data() | ||
print(fd.get_debtpaying_data(self.year, self.quarter)) | ||
|
||
def test_get_cashflow_data(self): | ||
self.set_data() | ||
print(fd.get_cashflow_data(self.year, self.quarter)) | ||
|
||
if __name__ == '__main__': | ||
unittest.main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
__version__ = '0.2.6' | ||
__version__ = '0.2.7' | ||
__author__ = 'Jimmy Liu' | ||
|
||
""" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters