Skip to content

Commit

Permalink
Revert "tests: use BTC ticker"
Browse files Browse the repository at this point in the history
This reverts commit 073428b.
  • Loading branch information
loiccoyle committed Sep 21, 2024
1 parent 47ed2a8 commit f5e98b0
Show file tree
Hide file tree
Showing 25 changed files with 4 additions and 12 deletions.
Binary file modified tests/data/layouts/big_logo_False_False_False.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/data/layouts/big_logo_False_False_True.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/data/layouts/big_logo_False_True_False.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/data/layouts/big_logo_False_True_True.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/data/layouts/big_logo_True_False_False.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/data/layouts/big_logo_True_False_True.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/data/layouts/big_logo_True_True_False.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/data/layouts/big_logo_True_True_True.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/data/layouts/big_price_False_False_False.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/data/layouts/big_price_False_False_True.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/data/layouts/big_price_False_True_False.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/data/layouts/big_price_False_True_True.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/data/layouts/big_price_True_False_False.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/data/layouts/big_price_True_False_True.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/data/layouts/big_price_True_True_False.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/data/layouts/big_price_True_True_True.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/data/layouts/default_False_False_False.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/data/layouts/default_False_False_True.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/data/layouts/default_False_True_False.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/data/layouts/default_False_True_True.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/data/layouts/default_True_False_False.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/data/layouts/default_True_False_True.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/data/layouts/default_True_True_False.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/data/layouts/default_True_True_True.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 4 additions & 12 deletions tests/unit/layouts/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,18 @@

from tinyticker.config import TickerConfig
from tinyticker.layouts.register import LayoutFunc
from tinyticker.tickers import TickerCrypto
from tinyticker.tickers import TickerStock

from ..utils import DATA_DIR, API_KEY
from ..utils import DATA_DIR

LAYOUT_DIR = DATA_DIR / "layouts"
UPDATE_REF_PLOTS = os.environ.get("TINYTICKER_UPDATE_REF_PLOTS", False)
DIMENSIONS = (250, 122)

if API_KEY is None:
raise ValueError("CRYPTOCOMPARE_API_KEY not set")


def layout_test(layout_func: LayoutFunc, dimensions, resp, data_dir):
config = TickerConfig(
symbol="BTC",
symbol_type="crypto",
interval="1d",
lookback=30,
plot_type="candle",
volume=False,
symbol="AAPL", interval="1d", lookback=30, plot_type="candle", volume=False
)
volume = [True, False]
y_axis = [True, False]
Expand All @@ -35,7 +27,7 @@ def layout_test(layout_func: LayoutFunc, dimensions, resp, data_dir):
config.layout.y_axis = y_axis
config.layout.x_gaps = x_gap

ticker = TickerCrypto(API_KEY, config)
ticker = TickerStock(config)
out = layout_func(dimensions, ticker, resp)
filename = f"{layout_func.__name__}_{y_axis}_{x_gap}_{volume}.png"
assert out.size == dimensions, f"Wrong dimensions: {filename}"
Expand Down

0 comments on commit f5e98b0

Please sign in to comment.