Hi,

You may want to work out what the ID argument is called and then use
the GetValue() instead of SetValue() method.  Then pass it through
gui_to_str() and use a self.assertEqual() to check that it is 'ZA_0'.
This should complete the test.  Note that you many need a wx.Yield()
call before getting the value to be sure that the GUI has updated.
Otherwise GetValue() might return an empty value.

Regards,

Edward




On 5 December 2013 14:14, Troels Emtekær Linnet <[email protected]> wrote:
> Hi Edward.
>
> I implemented a test, which will fail if the earlier fix is not there.
>
> But I would like to test, if the first ID in the page: rmsd
> is ZA_0
>
> Can I pull the id strings from this page?
>
> # Set the RMSD.
> page = wizard.get_page(wizard.page_indices['rmsd'])
> page.uf_args['error'].SetValue(float_to_gui(3000.0))
> wizard._ok(None)
>
> 2013/12/5 Edward d'Auvergne <[email protected]>:
>> Hi Troels,
>>
>> It might be worth setting up a GUI test to catch this.  As this is not
>> tested, a code re-factoring will eventually eliminate this feature!
>> Therefore the problem will return in the future, with close to 100%
>> probability as code re-factoring is quite common in relax.
>>
>> Regards,
>>
>> Edward
>>
>>
>>
>> On 5 December 2013 12:28,  <[email protected]> wrote:
>>> Author: tlinnet
>>> Date: Thu Dec  5 12:28:06 2013
>>> New Revision: 21788
>>>
>>> URL: http://svn.gna.org/viewcvs/relax?rev=21788&view=rev
>>> Log:
>>> Fix for loading a seriesTab formatted intensity, and getting the ID for the 
>>> following GUI elements.
>>>
>>> Fix for bug #21076, (https://gna.org/bugs/?21076) - When loading a 
>>> multi-spectra NMRPipe seriesTab file through the GUI, several Error 
>>> messages occur.
>>>
>>> Modified:
>>>     trunk/gui/wizards/peak_intensity.py
>>>
>>> Modified: trunk/gui/wizards/peak_intensity.py
>>> URL: 
>>> http://svn.gna.org/viewcvs/relax/trunk/gui/wizards/peak_intensity.py?rev=21788&r1=21787&r2=21788&view=diff
>>> ==============================================================================
>>> --- trunk/gui/wizards/peak_intensity.py (original)
>>> +++ trunk/gui/wizards/peak_intensity.py Thu Dec  5 12:28:06 2013
>>> @@ -317,6 +317,11 @@
>>>              # Use only the first element.
>>>              id = id[0]
>>>
>>> +        # Handle keyword 'auto'.
>>> +        if id == 'auto':
>>> +            # Return the first ID.
>>> +            id = 'Z_A0'
>>> +
>>>          # Set the ID in the page.
>>>          page = self.get_page(self.page_indices[page_key])
>>>          if index == None:
>>>
>>>
>>> _______________________________________________
>>> relax (http://www.nmr-relax.com)
>>>
>>> This is the relax-commits mailing list
>>> [email protected]
>>>
>>> To unsubscribe from this list, get a password
>>> reminder, or change your subscription options,
>>> visit the list information page at
>>> https://mail.gna.org/listinfo/relax-commits
>>
>> _______________________________________________
>> relax (http://www.nmr-relax.com)
>>
>> This is the relax-devel mailing list
>> [email protected]
>>
>> To unsubscribe from this list, get a password
>> reminder, or change your subscription options,
>> visit the list information page at
>> https://mail.gna.org/listinfo/relax-devel

_______________________________________________
relax (http://www.nmr-relax.com)

This is the relax-devel mailing list
[email protected]

To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-devel

Reply via email to