mirror of
https://github.com/hydrosquall/tiingo-python.git
synced 2025-12-17 20:04:19 +01:00
Added api cleaning tools, moved parser commands in script.
This commit is contained in:
@@ -118,7 +118,7 @@ To regenerate fixture remove it from tests/fixtures and run tests again::
|
|||||||
$ rm tests/fixtures/NAME.yaml
|
$ rm tests/fixtures/NAME.yaml
|
||||||
$ py.test
|
$ py.test
|
||||||
|
|
||||||
In order for py.test to have run, you will have had to create an environment variable containing a valid tiingo API key so that the test runner can make a valid api call. One way to do that is to::
|
In order for py.test to run, you will have had to create an environment variable containing a valid tiingo API key so that the test runner can make a valid api call. One way to do that is to::
|
||||||
|
|
||||||
$ export TIINGO_API_KEY='...insert api key here...'
|
$ export TIINGO_API_KEY='...insert api key here...'
|
||||||
|
|
||||||
|
|||||||
@@ -9,10 +9,6 @@ zeroapiregex = r'(\[Token )0{40}(\])'
|
|||||||
anyapiregex = r'(\[Token ).{40}(\])'
|
anyapiregex = r'(\[Token ).{40}(\])'
|
||||||
zeroapistring = '[Token '+40*'0'+']'
|
zeroapistring = '[Token '+40*'0'+']'
|
||||||
|
|
||||||
parser = argparse.ArgumentParser()
|
|
||||||
parser.add_argument("path", help="path to test fixtures",
|
|
||||||
nargs='?', default=fixturesDirectory)
|
|
||||||
args = parser.parse_args()
|
|
||||||
|
|
||||||
def api_key_detector(file):
|
def api_key_detector(file):
|
||||||
'''
|
'''
|
||||||
@@ -55,4 +51,8 @@ def main(path):
|
|||||||
print("Changed {} files.".format(nFilesChanged))
|
print("Changed {} files.".format(nFilesChanged))
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
parser = argparse.ArgumentParser()
|
||||||
|
parser.add_argument("path", help="path to test fixtures",
|
||||||
|
nargs='?', default=fixturesDirectory)
|
||||||
|
args = parser.parse_args()
|
||||||
main(args.path)
|
main(args.path)
|
||||||
|
|||||||
Reference in New Issue
Block a user