Terry J. Reedy <tjre...@udel.edu> added the comment:
I closed PR 2614 in response to Victor's comments, in particular his preference that tests not even read .idlerc. Since we do not want tests to depend on the contents, there is no need to even read the contents. (And the exception of testing write-read round-tripping requires a fresh temporary directory.) I propose that when testing, config.py should create idleConf.usercfg empty, without reference to .idlerc. The result would be the same as now after usercfg is replaced with testcfg, as in test_configdialog, without the need to revert the replacement. test_idle has the equivalent of import idlelib idlelib.testing = True The same should be added to any test module that sets options. Then idlelib.testing can be used to change config.py behavior. Victor: what changes to a module trigger the 'environment changed' warning/error? The above unreverted change to idlelib.__init__ does not. The unreverted change to idleCong in test_configdialog did, until fixed. ---------- assignee: -> terry.reedy components: +IDLE -Library (Lib) stage: -> needs patch title: regrtest: Add .idlerc to saved_test_environment -> IDLE: Don't touch .idlerc when testing. type: -> behavior versions: +Python 3.8 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue30869> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com