After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 342028 - Error in the tests contained in config.py
Error in the tests contained in config.py
Status: RESOLVED FIXED
Product: dogtail
Classification: Deprecated
Component: Framework
CVS HEAD
Other All
: Normal normal
: ---
Assigned To: Dogtail Maintainers
Dogtail Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-05-16 19:32 UTC by Len DiMaggio
Modified: 2006-06-02 18:54 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Len DiMaggio 2006-05-16 19:32:23 UTC
Please describe the problem:
Error in the tests contained in config.py

This code always returns a failure:

1        failure = True
2        failure = config.ensureSensitivity != True
3        config.ensureSensitivity = False
4        failure = failure or config.ensureSensitivity == True
5        config.ensureSensitivity = True
6        failure = failure or config.ensureSensitivity != True
7        failOrPass(failure, "Setting ensureSensitivity")

I think you wanted line 6 to use 'and', not 'or'


Steps to reproduce:
1. 
2. 
3. 


Actual results:


Expected results:


Does this happen every time?


Other information:
Comment 1 Zack Cerza 2006-06-02 18:54:51 UTC
Changing the 'or' to and 'and' on line 6 would bring the possibility of false passes.

The real problem stems from a change I made on 2005-11-01:
        * dogtail/config.py: Make config.ensureSensitivity False by default.

See, I forgot to update the unit test, which on line 3 does:
    failure = config.ensureSensitivity != True
when it should be:
    failure = config.ensureSensitivity != config.defaults['ensureSensitivity']

I fixed the problem. Thanks for reporting!