8000 Certain tests are never called · Issue #5704 · ccxt/ccxt · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Certain tests are never called #5704

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
xmatthias opened this issue Aug 17, 2019 · 4 comments
Closed

Certain tests are never called #5704

xmatthias opened this issue Aug 17, 2019 · 4 comments
Assignees
Labels
bug important Higher priority

Comments

@xmatthias
Copy link
Contributor
xmatthias commented Aug 17, 2019
  • OS: linux
  • Programming Language version: python (all?)
  • CCXT version: master
  • Exchange: none
  • Method: node run-tests

The Contributing documentation states to run node run-tests after npm run build.

This however does only run the main test-file (test.py / test.php, ...).

Files like test_exchange_datetime_functions.py | test.datetime.js are not ran (and i did not find any reference on how/when this would ever be running during CI) - so i think these tests are not tested.

While this could be intentional (to shorten test-times) - i don't think it is.

@frosty00
Copy link
Member
frosty00 commented Aug 17, 2019

those tests are passing. i see no problem here... npm run-tests only tests the exchanges (files which would be edited and need to run during CI), whereas mostly the ccxt dev team will check that the datetime functions and other essential parts of the lib are working.

@xmatthias
Copy link
Contributor Author
xmatthias commented Aug 17, 2019

well datetime-functions file was one example ...
but some of the other files are not working correctly within the docker-container:

root@ff35d93a20b3:/ccxt# python3 python/test/test_get_zeroex_order_hash_v2.py 
Traceback (most recent call last):
  File "python/test/test_get_zeroex_order_hash_v2.py", line 36, in <module>
    assert(exchange.getZeroExOrderHashV2(example_order) == expected_order_hash)
  File "/usr/local/lib/python3.6/dist-packages/ccxt-1.18.1061-py3.6.egg/ccxt/base/exchange.py", line 1889, in getZeroExOrderHashV2
    domain_struct_hash = self.web3.sha3(
AttributeError: 'NoneType' object has no attribute 'sha3'

This above one seems to be based on a missed installation dependency, but the next one... ?

root@ff35d93a20b3:/ccxt# python3 python/test/test_calculate_fee.py 
Traceback (most recent call last):
  File "python/test/test_calculate_fee.py", line 41, in <module>
    exchange.calculate_fee(market['symbol'], 'limit', 'sell', amount, price, 'taker', {})
  File "/usr/local/lib/python3.6/dist-packages/ccxt-1.18.1061-py3.6.egg/ccxt/base/exchange.py", line 1671, in calculate_fee
    cost = float(self.cost_to_precision(symbol, amount * price))
  File "/usr/local/lib/python3.6/dist-packages/ccxt-1.18.1061-py3.6.egg/ccxt/base/exchange.py", line 1150, in cost_to_precision
    return self.decimal_to_precision(cost, ROUND, self.markets[symbol]['precision']['price'], self.precisionMode)
KeyError: 'price'

does it hurt to run them in CI ... ? they don't take that long ... ?

frosty00 added a commit to frosty00/ccxt that referenced this issue Aug 18, 2019
@ccxt ccxt deleted a comment Dec 19, 2019
@kroitor
Copy link
Member
kroitor commented Dec 19, 2019

This above one seems to be based on a missed installation dependency

That is correct, if you are going to test all exchanges you will also need web3, however, we don't install it by default, it's a responsibility of the user.

but the next one... ?

The next one is not finished yet: https://github.com/ccxt/ccxt/blob/master/python/test/test_calculate_fee.py#L3

@ttodua ttodua added question important Higher priority bug and removed question labels Jul 16, 2022
@ttodua
Copy link
Member
ttodua commented Jul 31, 2023

a late reply - tests are actively being worked on. would be better to get feedback on current state and issues, as this issue is now 4 years old and we'd better close this current topic (& move into new issue whenever needed).

@ttodua ttodua closed this as completed Jul 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug important Higher priority
Projects
None yet
Development

No branches or pull requests

4 participants
0