From 168b6c317ca054c1287c36be532964e861f44266 Mon Sep 17 00:00:00 2001 From: Josiah Baker Date: Wed, 9 Jun 2021 15:31:48 +0200 Subject: add dummy file param to fix jupyter testshell in jupyter was failing due to an extra arg. this adds a dummy -f param, which allows TestShell to be used in a command line or jupyter environment --- test/functional/test_framework/test_framework.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'test/functional') diff --git a/test/functional/test_framework/test_framework.py b/test/functional/test_framework/test_framework.py index a89a26caea..40360c54a0 100755 --- a/test/functional/test_framework/test_framework.py +++ b/test/functional/test_framework/test_framework.py @@ -194,6 +194,10 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass): help="Run test using legacy wallets", dest='descriptors') self.add_options(parser) + # Running TestShell in a Jupyter notebook causes an additional -f argument + # To keep TestShell from failing with an "unrecognized argument" error, we add a dummy "-f" argument + # source: https://stackoverflow.com/questions/48796169/how-to-fix-ipykernel-launcher-py-error-unrecognized-arguments-in-jupyter/56349168#56349168 + parser.add_argument("-f", "--fff", help="a dummy argument to fool ipython", default="1") self.options = parser.parse_args() self.options.previous_releases_path = previous_releases_path -- cgit v1.2.3