diff test/test_admin.py @ 7802:7c0a8088b053

feat: add support for controlling readline history features You can disable loading or saving the history file and disable loading the readline rc file. This is controlled by pragma history_features which is a bit string. Setting a bit disables the feature. Also cleaned up a python traceback if an invalid pragma was specified on the command line. Just displays an error message and drops into interactive mode. I had a hand when running regression tests with tet-admin.py::testBasicInteractive. It was loading the history file and saving the commands making the file huge. So disable all history_features by default when testing by setting pragma to 7.
author John Rouillard <rouilj@ieee.org>
date Wed, 13 Mar 2024 12:18:36 -0400
parents b2dbab2b34bc
children 2746337ded4c
line wrap: on
line diff
--- a/test/test_admin.py	Wed Mar 13 00:51:09 2024 -0400
+++ b/test/test_admin.py	Wed Mar 13 12:18:36 2024 -0400
@@ -134,7 +134,10 @@
 
         self.install_init()
         self.admin=AdminTool()
-        sys.argv=['main', '-i', self.dirname]
+        # set history_features to disable loading/saving history
+        # and loading rc file. Otherwise file gets large and
+        # breaks testing or overwrites the users history file.
+        sys.argv=['main', '-i', self.dirname, '-P', 'history_features=7']
 
         with captured_output() as (out, err):
             ret = self.admin.main()

Roundup Issue Tracker: http://roundup-tracker.org/