Open GlenDC opened 5 years ago
As I can see that there is a bug in clients.x.test()
according to latest changs in baseClasses. Here is an example of the bug.
j.clients.tfchain.test()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/sandbox/lib/jumpscale/Jumpscale/clients/blockchain/tfchain/TFChainClientFactory.py", line 50, in test
self._test_run(name=name)
File "/sandbox/lib/jumpscale/Jumpscale/core/BASECLASSES/JSConfigs.py", line 328, in __getattr__
return self.__getattribute__(name) # else see if we can from the factory find the child object
AttributeError: 'TFChainClientFactory' object has no attribute '_test_run'
I'm investigating to fix this bug as it is infecting all clients but for you can do this hack to make your test run
from .BASECLASSES.JSFactoryTools import JSFactoryTools
and make your TFRivineClientFactory.py inherit from it too.
In the current version of JSX we have a single blockchain client, all available under
j.clients.tfchain
. As we'll have other Rivine-based chains as well (we already have 1, the goldchain, and will soon have 2 more on top of it), it is needed to easily provide different JSX blockchain clients, without copying that code around for all these clients, as that would result in an unmaintainable mess.In order to achieve this I was planning to move the relevant code that is not tfchain-specific (most code) to /clients/blockchain/rivine and modify where needed.
Now more importantly. For that code I also have a bunch of tests, probably grouped as a group of files where a file can have one or multiple tests related to a specific part of the rivine codebase. How do I run these tests? For now these tests live (on my computer, not a branch) under
/clients/blockchain/rivine/tests
. I cannot run them usingj.clients.rivine.test()
as that would require a FactoryBaseClass that registers that namespace and is meant for clients. But, as I said, none of this is required or desired.