Oops, okay. That makes sense.<br><br>Thanks again for the advice everyone. I appreciate it a lot.<br><br><div class="gmail_quote">On Thu, May 3, 2012 at 6:10 PM, Walter Bender <span dir="ltr"><<a href="mailto:walter.bender@gmail.com" target="_blank">walter.bender@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Thu, May 3, 2012 at 8:14 PM, Taylor Rose (RIT Student)<br>
<<a href="mailto:tjr1351@rit.edu">tjr1351@rit.edu</a>> wrote:<br>
> James,<br>
><br>
> using sugar-launch, do you think I could get a hold of any output the<br>
> activity writes to stdout? I've been thinking that maybe I could have a test<br>
> mode where the activity would run tests internally and report the results to<br>
> stdout. The test program would just parse the output then...<br>
<br>
</div>I think this is what Rafael was trying to suggest. Most activities<br>
write diagnostic info to a log file. This output can be parsed. (It is<br>
found in .sugar/default/logs<br>
<br>
-walter<br>
<div class="im HOEnZb">><br>
> -Taylor<br>
><br>
><br>
> On Thu, May 3, 2012 at 3:56 PM, James Cameron <<a href="mailto:quozl@laptop.org">quozl@laptop.org</a>> wrote:<br>
>><br>
>> I have not seen any activity with unit tests.<br>
>><br>
>> I have seen and maintained Python code with tests that are implemented<br>
>> as conditional blocks at the end of each source file except the main<br>
>> source file.  These conditional blocks are predicated on execution of<br>
>> the file alone, and not on import.  The main source file was in the<br>
>> directory above, with all the imported files in a directory below.<br>
>><br>
>> So running the tests was:<br>
>><br>
>>        for x in directory/*/py; do python $x; done<br>
>><br>
>> However, since most source files in a Sugar activity tend to depend on<br>
>> GTK+ or Sugar, this approach is not as useful.  This approach can be<br>
>> used for the model third of the model view controller style.<br>
>><br>
>> Taylor, sugar-launch can be used to launch an activity in a testing<br>
>> environment, but scripted control of the launched activity is your next<br>
>> challenge.<br>
>><br>
>> --<br>
>> James Cameron<br>
>> <a href="http://quozl.linux.org.au/" target="_blank">http://quozl.linux.org.au/</a><br>
><br>
><br>
><br>
</div><div class="HOEnZb"><div class="h5">> _______________________________________________<br>
> Sugar-devel mailing list<br>
> <a href="mailto:Sugar-devel@lists.sugarlabs.org">Sugar-devel@lists.sugarlabs.org</a><br>
> <a href="http://lists.sugarlabs.org/listinfo/sugar-devel" target="_blank">http://lists.sugarlabs.org/listinfo/sugar-devel</a><br>
><br>
<br>
<br>
<br>
</div></div><span class="HOEnZb"><font color="#888888">--<br>
Walter Bender<br>
Sugar Labs<br>
<a href="http://www.sugarlabs.org" target="_blank">http://www.sugarlabs.org</a><br>
</font></span></blockquote></div><br>