-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #57 from TrevorFrench/cran-tests
skipping tests on CRAN as directed by CRAN team
- Loading branch information
Showing
15 changed files
with
63 additions
and
5 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 |
---|---|---|
@@ -1,23 +1,28 @@ | ||
test_that('the "binance_us_server_time" function returns a double', { | ||
skip_on_cran() | ||
expect_type(binance_us_server_time(), 'double') | ||
}) | ||
|
||
test_that('the "binance_us_ping" function returns a "200" status code', { | ||
skip_on_cran() | ||
expect_true(binance_us_ping()$status_code == 200) | ||
}) | ||
|
||
test_that('the "binance_us_time" function returns a double', { | ||
skip_on_cran() | ||
expect_type(binance_us_server_time(), 'double') | ||
}) | ||
|
||
test_that('the "binance_us_recent_trades" function returns a dataframe | ||
regardless of symbol casing', { | ||
expect_s3_class(binance_us_recent_trades('LTCBTC', 1000), 'data.frame') | ||
expect_s3_class(binance_us_recent_trades('LtCbTc', 1000), 'data.frame') | ||
expect_s3_class(binance_us_recent_trades('ltcbtc', 1000), 'data.frame') | ||
skip_on_cran() | ||
expect_s3_class(binance_us_recent_trades('LTCBTC', 1000), 'data.frame') | ||
expect_s3_class(binance_us_recent_trades('LtCbTc', 1000), 'data.frame') | ||
expect_s3_class(binance_us_recent_trades('ltcbtc', 1000), 'data.frame') | ||
}) | ||
|
||
test_that('the "binance_us_recent_trades" function does not return more rows | ||
than the specified limit', { | ||
expect_true(nrow(binance_us_recent_trades('LTCBTC', 10)) <= 10) | ||
skip_on_cran() | ||
expect_true(nrow(binance_us_recent_trades('LTCBTC', 10)) <= 10) | ||
}) |
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,37 +1,44 @@ | ||
test_that('the "cex_io_ticker" function returns a list regardless of casing', { | ||
skip_on_cran() | ||
expect_type(cex_io_ticker('BTC', 'usd'), 'list') | ||
}) | ||
|
||
test_that('the "cex_io_ticker" function does not return an error regardless of | ||
casing', { | ||
skip_on_cran() | ||
expect_true(is.null(cex_io_ticker('BTC', 'usd')$error)) | ||
}) | ||
|
||
test_that('the "cex_io_currency_limits" function returns a dataframe', { | ||
skip_on_cran() | ||
expect_s3_class(cex_io_currency_limits(), 'data.frame') | ||
}) | ||
|
||
test_that('the "cex_io_last_price" function does not return an error regardless | ||
of the symbol casing', { | ||
skip_on_cran() | ||
expect_true(is.null(cex_io_last_price('btc', 'usd')$error)) | ||
expect_true(is.null(cex_io_last_price('BTC', 'USD')$error)) | ||
expect_true(is.null(cex_io_last_price('BtC', 'uSd')$error)) | ||
}) | ||
|
||
test_that('the "cex_io_converter" function does not return a null value | ||
regardless of the symbol casing', { | ||
skip_on_cran() | ||
expect_true(!is.null(cex_io_converter('btc', 'usd', 2.5))) | ||
expect_true(!is.null(cex_io_converter('BTC', 'USD', 2.5))) | ||
expect_true(!is.null(cex_io_converter('BtC', 'uSd', 2.5))) | ||
}) | ||
|
||
test_that('the "cex_io_ohlcv" function does not return a null value regardless | ||
of the symbol casing', { | ||
skip_on_cran() | ||
expect_type(cex_io_ohlcv('20220927', 'btc', 'usd'), 'list') | ||
expect_type(cex_io_ohlcv('20220927', 'BTC', 'USD'), 'list') | ||
expect_type(cex_io_ohlcv('20220927', 'BtC', 'uSd'), 'list') | ||
}) | ||
|
||
test_that('the "cex_io_nonce" function returns a double', { | ||
skip_on_cran() | ||
expect_type(cex_io_nonce(), 'double') | ||
}) |
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,3 +1,4 @@ | ||
test_that('the "coingecko_ping" function returns a list', { | ||
skip_on_cran() | ||
expect_type(coingecko_ping(), 'list') | ||
}) |
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,7 +1,9 @@ | ||
test_that('the "coinlist_symbols" function returns a dataframe', { | ||
skip_on_cran() | ||
expect_s3_class(coinlist_symbols(), 'data.frame') | ||
}) | ||
|
||
test_that('the "coinlist_time" function returns a double', { | ||
skip_on_cran() | ||
expect_type(coinlist_time(), 'double') | ||
}) |
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,7 +1,9 @@ | ||
test_that('the "gemini_symbols" function returns a character vector', { | ||
skip_on_cran() | ||
expect_type(gemini_symbols(), 'character') | ||
}) | ||
|
||
test_that('the "gemini_price_feed" function returns a dataframe', { | ||
skip_on_cran() | ||
expect_s3_class(gemini_price_feed(), 'data.frame') | ||
}) |
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,3 +1,4 @@ | ||
test_that('the "huobi_candles" function returns a dataframe', { | ||
skip_on_cran() | ||
expect_s3_class(huobi_candles('1day', '200', 'btcusdt'), 'data.frame') | ||
}) |
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,25 +1,30 @@ | ||
test_that('the "kraken_server_time" function returns unixtime as an integer and | ||
rfc1123 as a character', { | ||
skip_on_cran() | ||
expect_type(kraken_server_time()$unixtime, 'integer') | ||
expect_type(kraken_server_time()$rfc1123, 'character') | ||
}) | ||
|
||
test_that('the "kraken_server_time" function returns status as a character and | ||
timestamp as a character', { | ||
skip_on_cran() | ||
expect_type(kraken_server_status()$status, 'character') | ||
expect_type(kraken_server_status()$timestamp, 'character') | ||
}) | ||
|
||
test_that('the "kraken_asset_info" function returns a list', { | ||
skip_on_cran() | ||
expect_type(kraken_asset_info(), 'list') | ||
expect_type(kraken_asset_info("ETH,BTC"), 'list') | ||
expect_type(kraken_asset_info(aclass = "currency"), 'list') | ||
}) | ||
|
||
test_that('the "kraken_asset_pairs" function returns a list', { | ||
skip_on_cran() | ||
expect_type(kraken_asset_pairs(), 'list') | ||
}) | ||
|
||
test_that('the "kraken_ticker_info" function returns a list', { | ||
skip_on_cran() | ||
expect_type(kraken_ticker_info("ETHUSD"), 'list') | ||
}) |
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,7 +1,9 @@ | ||
test_that('the "kucoin_time" function returns a character', { | ||
skip_on_cran() | ||
expect_type(kucoin_time(), 'character') | ||
}) | ||
|
||
test_that('the "kucoin_symbols_list" function returns a dataframe', { | ||
skip_on_cran() | ||
expect_s3_class(kucoin_symbols_list('btc'), 'data.frame') | ||
}) |
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
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