1515 file.
1616"""
1717import os
18- import tempfile
1918
20- from test_framework .test_framework import BitcoinTestFramework , assert_equal
19+ from test_framework .test_framework import BitcoinTestFramework
2120
2221class IncludeConfTest (BitcoinTestFramework ):
2322 def set_test_params (self ):
@@ -44,20 +43,18 @@ def run_test(self):
4443
4544 self .log .info ("-includeconf cannot be used as command-line arg. subversion should still end with 'main; relative)/'" )
4645 self .stop_node (0 )
47- with tempfile .SpooledTemporaryFile (max_size = 2 ** 16 ) as log_stderr :
48- self .start_node (0 , extra_args = ["-includeconf=relative2.conf" ], stderr = log_stderr )
4946
50- subversion = self .nodes [ 0 ]. getnetworkinfo ()[ "subversion" ]
51- assert subversion . endswith ( "main; relative)/" )
52- log_stderr . seek ( 0 )
53- stderr = log_stderr . read (). decode ( 'utf-8' ). strip ( )
54- assert_equal ( stderr , ' warning: -includeconf cannot be used from commandline; ignoring -includeconf=relative2.conf' )
47+ self .start_node ( 0 , extra_args = [ "-includeconf=relative2.conf" ])
48+
49+ subversion = self . nodes [ 0 ]. getnetworkinfo ()[ "subversion" ]
50+ assert subversion . endswith ( "main; relative)/" )
51+ self . stop_node ( 0 , expected_stderr = " warning: -includeconf cannot be used from commandline; ignoring -includeconf=relative2.conf" )
5552
5653 self .log .info ("-includeconf cannot be used recursively. subversion should end with 'main; relative)/'" )
5754 with open (os .path .join (self .options .tmpdir , "node0" , "relative.conf" ), "a" , encoding = "utf8" ) as f :
5855 f .write ("includeconf=relative2.conf\n " )
5956
60- self .restart_node (0 )
57+ self .start_node (0 )
6158
6259 subversion = self .nodes [0 ].getnetworkinfo ()["subversion" ]
6360 assert subversion .endswith ("main; relative)/" )
0 commit comments