For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See: http://commonmark.org/help/

unit testing strategies



  • Hello,

    I'm trying to unit test my strategy, but I'm finding it hard to obtain an instantiated object for my Strategy class,

    these classes are supposed to be instantiated directly by Cerebro, so if I try instantiating them directly I get:

     *** AttributeError: 'NoneType' object has no attribute '_next_stid'
    

    on the other side, cerebro seems to hold only an uninstantiated version of the class, how could I get an instantiated Strategy Object so that I could unit test its methods?

    Thanks,


  • administrators

    You cannot. The testing approach is result based not unit based.


Log in to reply
 

});