mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-10-27 12:40:35 +00:00
Add start and exit test
This commit is contained in:
5
.github/workflows/Mac.yml
vendored
5
.github/workflows/Mac.yml
vendored
@@ -2,6 +2,7 @@ name: Mac OS X Full Clean Build with ML
|
||||
env:
|
||||
GTFF_USE_PROMPT_TOOLKIT: false
|
||||
GTFF_USE_ION: false
|
||||
GTFF_ENABLE_QUICK_EXIT: true
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
@@ -63,3 +64,7 @@ jobs:
|
||||
- name: Run tests (Bash)
|
||||
shell: bash -l {0}
|
||||
run: pytest tests/
|
||||
|
||||
- name: Start Terminal and exit
|
||||
shell: bash -l {0}
|
||||
run: python terminal.py
|
||||
|
||||
11
.github/workflows/test.yml
vendored
11
.github/workflows/test.yml
vendored
@@ -2,6 +2,7 @@ name: Tests
|
||||
env:
|
||||
GTFF_USE_PROMPT_TOOLKIT: false
|
||||
GTFF_USE_ION: false
|
||||
GTFF_ENABLE_QUICK_EXIT: true
|
||||
on: [pull_request, push]
|
||||
jobs:
|
||||
linting:
|
||||
@@ -72,6 +73,9 @@ jobs:
|
||||
run: |
|
||||
source $VENV
|
||||
pytest tests/
|
||||
|
||||
- name: Start Terminal and exit
|
||||
run: python terminal.py
|
||||
tests-python:
|
||||
name: Python (${{ matrix.python-version }}, ${{ matrix.os }})
|
||||
needs: test
|
||||
@@ -120,6 +124,9 @@ jobs:
|
||||
run: |
|
||||
source $VENV
|
||||
pytest tests/
|
||||
|
||||
- name: Start Terminal and exit
|
||||
run: python terminal.py
|
||||
tests-conda:
|
||||
name: Conda (${{ matrix.python-version }}, ${{ matrix.os }})
|
||||
needs: test
|
||||
@@ -187,3 +194,7 @@ jobs:
|
||||
- name: Run tests (Bash)
|
||||
shell: bash -l {0}
|
||||
run: pytest tests/
|
||||
|
||||
- name: Start Terminal and exit
|
||||
shell: bash -l {0}
|
||||
run: python terminal.py
|
||||
|
||||
4
.github/workflows/windows.yml
vendored
4
.github/workflows/windows.yml
vendored
@@ -2,6 +2,7 @@ name: Windows 10 Full Clean Build with ML
|
||||
env:
|
||||
GTFF_USE_PROMPT_TOOLKIT: false
|
||||
GTFF_USE_ION: false
|
||||
GTFF_ENABLE_QUICK_EXIT: true
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
@@ -72,3 +73,6 @@ jobs:
|
||||
shell: bash -l {0}
|
||||
run: pytest tests/
|
||||
|
||||
- name: Start Terminal and exit
|
||||
shell: bash -l {0}
|
||||
run: python terminal.py
|
||||
|
||||
@@ -24,3 +24,6 @@ USE_PLOT_AUTOSCALING = strtobool(os.getenv("GTFF_USE_PLOT_AUTOSCALING", "False")
|
||||
|
||||
# Enable thoughts of the day
|
||||
ENABLE_THOUGHTS_DAY = strtobool(os.getenv("GTFF_ENABLE_THOUGHTS_DAY", "False"))
|
||||
|
||||
# Quick exit for testing
|
||||
ENABLE_QUICK_EXIT = strtobool(os.getenv("GTFF_ENABLE_QUICK_EXIT", "False"))
|
||||
|
||||
@@ -115,6 +115,10 @@ def main():
|
||||
print_help(s_ticker, s_start, s_interval, b_is_stock_market_open())
|
||||
should_print_help = False
|
||||
|
||||
if gtff.ENABLE_QUICK_EXIT:
|
||||
print("Quick exit enabled")
|
||||
break
|
||||
|
||||
# Get input command from stdin or user
|
||||
if not parsed_stdin and len(sys.argv) > 1:
|
||||
as_input = " ".join(sys.argv[1:])
|
||||
|
||||
Reference in New Issue
Block a user