On Mar 16, 1:47 pm, "Edward K. Ream" <[email protected]> wrote:
> When you run an @test node using the run-unit-tests-locally command, or its
> equivalent (say with an @button script), the code you are testing is the
> code that is loaded when you load the .leo file containing the tests, the
> original .leo file.
>
> OTOH, when you run an @test node using the run-unit-tests command (or
> equivalent), Leo creates an external .leo file, fires up that file and runs
> the tests in *that* .leo file. In that case, the code you are testing is
> the last code saved, regardless of when you loaded the *original* .leo file.
>
> So in general, you have two ways of testing the very latest code:
>
> 1. Reload the .leo file containing the @test node you want to test.
>
> 2. Use the run-unit-tests command to run the unit tests externally.
I think we are talking about two different use cases here, you're
talking about unittesting the code that makes up Leo, which naturally
gets loaded when you start Leo, I'm talking about testing code that is
just python code that you are writing, it may not end up in Leo,
pieces of it are runable so they are in @button's just for testing,
(well in general, --the specific code I'm dealing with is destined to
be put in a plug-in, but I'm following the "put it in a button -
first" development track). The code is loaded when you push the
button and run as a script, but otherwise it is not part of Leo, so to
test it, I need create a scriptfile.py that, in essence, 'copy-pastes'
the scriptfile.py that pushing the button creates, followed by the
test code.
Tom
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"leo-editor" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/leo-editor?hl=en
-~----------~----~----~----~------~----~------~--~---