classification
Title: Idle: test configuration files
Type: enhancement Stage: needs patch
Components: IDLE Versions: Python 3.8, Python 3.7
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: terry.reedy Nosy List: Saimadhav.Heblikar, jesstess, terry.reedy
Priority: normal Keywords: patch

Created on 2014-06-08 20:11 by terry.reedy, last changed 2020-01-28 04:10 by terry.reedy.

Files
File name Uploaded Description Edit
test-configuration.diff Saimadhav.Heblikar, 2014-06-11 14:08 review
test-configuration-v2.diff Saimadhav.Heblikar, 2014-06-15 05:54 Update patch as per Rietveld comments. review
Messages (6)
msg220053 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2014-06-08 20:11
Spinoff of #12274 and a dependency thereof: new test_configurations.py should statically test that configparser, called from idlelib.configHandler, can process all the configuration.def files without error.
msg220225 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2014-06-11 01:48
The format paragraph entry in main.def is being moved to extensions.def, so don't test for it in main.def.
msg220271 - (view) Author: Saimadhav Heblikar (Saimadhav.Heblikar) * Date: 2014-06-11 14:08
Attaching a patch to test the default configuration files. config-keys.def will be added once the issues related to it[1] are resolved.
In this patch, test that the configHandler module can successfully extract the values. For places where numeric values are expected, ensure that the values are correct. For strings, it only ensures that the values are reasonably correct.



----

[1] https://mail.python.org/pipermail/idle-dev/2014-June/003431.html
msg220514 - (view) Author: Tal Einat (taleinat) * (Python committer) Date: 2014-06-13 23:51
I've done a thorough review of the tests. The overall structure and tests are fine, but I found quite a few issues that should be addressed.

Saimadhav, considering these are some of the first tests you've written, please know that I am impressed! I have many comments because I believe our tests should be excellent and I'm a bit pedantic. However I've seen many people write poorer test suites after despite having considerable experience. So keep up the good work, learn from our feedback and everything will be great!
msg228258 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2014-10-02 20:57
I closed #12274, but it might be consulted before closing this.
msg360837 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2020-01-28 04:10
The issue is obsolete with respect to the minimal test implied by the opening message.  At least two tests (added since this was written) read the .def files.

Some of the proposed tests are, now at least, redundant  For boolean tests like
    self.assertIn(get('editor-on-startup', 'bool'), (True, False))
a non-boolean value results in a Warning (treated like error), the assert, and remaining tests are skipped, and IDLD hangs.  Stripping strings should not be needed.

Some of the tests should be part of a startup check of default *and* user options.  Values should also be checked when changed (they mostly are).

Since new options have been added, some tests are missing.

I would like to have a 3-layer option map that can be used for both runtime change and the test suite.
History
Date User Action Args
2020-01-28 04:10:53terry.reedysetmessages: + msg360837
2019-03-20 16:43:50terry.reedysetcomponents: + IDLE
versions: + Python 3.7, Python 3.8, - Python 2.7, Python 3.4, Python 3.5
2017-09-28 07:00:41taleinatsetnosy: - taleinat
2014-10-02 20:57:16terry.reedysetmessages: + msg228258
2014-10-02 20:56:09terry.reedyunlinkissue12274 dependencies
2014-06-15 05:54:54Saimadhav.Heblikarsetfiles: + test-configuration-v2.diff
2014-06-13 23:51:17taleinatsetnosy: + taleinat
messages: + msg220514
2014-06-11 17:55:22terry.reedysettitle: Idle: test syntax of configuration files -> Idle: test configuration files
2014-06-11 14:08:33Saimadhav.Heblikarsetfiles: + test-configuration.diff
keywords: + patch
messages: + msg220271
2014-06-11 01:48:22terry.reedysetnosy: + jesstess
messages: + msg220225
2014-06-08 20:17:25terry.reedylinkissue12274 dependencies
2014-06-08 20:11:35terry.reedycreate