diff --git a/tests/block_weight/block_weight.py b/tests/block_weight/block_weight.py index a17e05241b..637fb804e6 100755 --- a/tests/block_weight/block_weight.py +++ b/tests/block_weight/block_weight.py @@ -1,9 +1,8 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # Simulate a maximal block attack on the Monero network # This uses the scheme proposed by ArticMine # Written by Sarang Nother # Copyright (c) 2019-2024, The Monero Project -from __future__ import print_function import sys import math diff --git a/tests/block_weight/compare.py b/tests/block_weight/compare.py index e046e16405..daf3bca12f 100755 --- a/tests/block_weight/compare.py +++ b/tests/block_weight/compare.py @@ -1,6 +1,5 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 -from __future__ import print_function import sys import subprocess diff --git a/tests/difficulty/gen_wide_data.py b/tests/difficulty/gen_wide_data.py index 64af4e208b..9df11ac628 100755 --- a/tests/difficulty/gen_wide_data.py +++ b/tests/difficulty/gen_wide_data.py @@ -1,6 +1,5 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 -from __future__ import print_function import random DIFFICULTY_TARGET = 120 diff --git a/tests/difficulty/generate-data b/tests/difficulty/generate-data index 24926796af..0f0a549f74 100755 --- a/tests/difficulty/generate-data +++ b/tests/difficulty/generate-data @@ -1,4 +1,4 @@ -#!/usr/bin/python3 +#!/usr/bin/env python3 # Copyright (c) 2014-2024, The Monero Project # diff --git a/tests/difficulty/wide_difficulty.py b/tests/difficulty/wide_difficulty.py index 41a2a632db..7fb030bc44 100755 --- a/tests/difficulty/wide_difficulty.py +++ b/tests/difficulty/wide_difficulty.py @@ -1,6 +1,5 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 -from __future__ import print_function import sys import subprocess diff --git a/tests/functional_tests/address_book.py b/tests/functional_tests/address_book.py index 84365fe8c7..c6090e2536 100755 --- a/tests/functional_tests/address_book.py +++ b/tests/functional_tests/address_book.py @@ -32,7 +32,6 @@ """Test wallet address book RPC """ -from __future__ import print_function from framework.wallet import Wallet class AddressBookTest(): diff --git a/tests/functional_tests/bans.py b/tests/functional_tests/bans.py index fa0a19664d..1f9a5bb9c6 100755 --- a/tests/functional_tests/bans.py +++ b/tests/functional_tests/bans.py @@ -28,7 +28,6 @@ # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF # THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -from __future__ import print_function import time """Test peer baning RPC calls diff --git a/tests/functional_tests/blockchain.py b/tests/functional_tests/blockchain.py index db0bd2eefe..c1b610596d 100755 --- a/tests/functional_tests/blockchain.py +++ b/tests/functional_tests/blockchain.py @@ -29,7 +29,6 @@ # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF # THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -from __future__ import print_function import time """Test daemon blockchain RPC calls diff --git a/tests/functional_tests/check_missing_rpc_methods.py b/tests/functional_tests/check_missing_rpc_methods.py index 0eedd6d0f1..54f2e5de44 100644 --- a/tests/functional_tests/check_missing_rpc_methods.py +++ b/tests/functional_tests/check_missing_rpc_methods.py @@ -1,6 +1,5 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 -from __future__ import print_function import sys import re diff --git a/tests/functional_tests/cold_signing.py b/tests/functional_tests/cold_signing.py index 38e1baa265..bb9b536c59 100755 --- a/tests/functional_tests/cold_signing.py +++ b/tests/functional_tests/cold_signing.py @@ -31,7 +31,6 @@ """Test cold tx signing """ -from __future__ import print_function from framework.daemon import Daemon from framework.wallet import Wallet import random diff --git a/tests/functional_tests/daemon_info.py b/tests/functional_tests/daemon_info.py index 9d645330d2..e7a67871fe 100755 --- a/tests/functional_tests/daemon_info.py +++ b/tests/functional_tests/daemon_info.py @@ -37,7 +37,6 @@ Test the following RPCs: """ -from __future__ import print_function import os from framework.daemon import Daemon diff --git a/tests/functional_tests/functional_tests_rpc.py b/tests/functional_tests/functional_tests_rpc.py index e483352a43..ca55ed3011 100755 --- a/tests/functional_tests/functional_tests_rpc.py +++ b/tests/functional_tests/functional_tests_rpc.py @@ -1,6 +1,5 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 -from __future__ import print_function import sys import time import subprocess diff --git a/tests/functional_tests/get_output_distribution.py b/tests/functional_tests/get_output_distribution.py index 54cb630353..1d127da97f 100755 --- a/tests/functional_tests/get_output_distribution.py +++ b/tests/functional_tests/get_output_distribution.py @@ -31,7 +31,6 @@ """Test get_output_distribution RPC """ -from __future__ import print_function from framework.daemon import Daemon from framework.wallet import Wallet diff --git a/tests/functional_tests/integrated_address.py b/tests/functional_tests/integrated_address.py index 912bee26ac..1009fc1fcb 100755 --- a/tests/functional_tests/integrated_address.py +++ b/tests/functional_tests/integrated_address.py @@ -36,7 +36,6 @@ Test the following RPCs: """ -from __future__ import print_function from framework.wallet import Wallet class IntegratedAddressTest(): diff --git a/tests/functional_tests/k_anonymity.py b/tests/functional_tests/k_anonymity.py index 1182d29c85..0225faab64 100755 --- a/tests/functional_tests/k_anonymity.py +++ b/tests/functional_tests/k_anonymity.py @@ -28,7 +28,6 @@ # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF # THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -from __future__ import print_function import math import random diff --git a/tests/functional_tests/mining.py b/tests/functional_tests/mining.py index aa7e291b5e..08b470364d 100755 --- a/tests/functional_tests/mining.py +++ b/tests/functional_tests/mining.py @@ -29,7 +29,6 @@ # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF # THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -from __future__ import print_function import time import os import math diff --git a/tests/functional_tests/multisig.py b/tests/functional_tests/multisig.py index c29cd1322b..7c75493eb7 100755 --- a/tests/functional_tests/multisig.py +++ b/tests/functional_tests/multisig.py @@ -28,7 +28,6 @@ # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF # THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -from __future__ import print_function import random """Test multisig transfers diff --git a/tests/functional_tests/p2p.py b/tests/functional_tests/p2p.py index 8d92318ceb..b878d0f14d 100755 --- a/tests/functional_tests/p2p.py +++ b/tests/functional_tests/p2p.py @@ -29,7 +29,6 @@ # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF # THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -from __future__ import print_function import time """Test daemon P2P diff --git a/tests/functional_tests/proofs.py b/tests/functional_tests/proofs.py index 83869a0635..2268df14b3 100755 --- a/tests/functional_tests/proofs.py +++ b/tests/functional_tests/proofs.py @@ -28,8 +28,6 @@ # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF # THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -from __future__ import print_function - """Test misc proofs (tx key, send, receive, reserve) """ diff --git a/tests/functional_tests/rpc_payment.py b/tests/functional_tests/rpc_payment.py index 5b65b5af41..b2a9ca47dd 100755 --- a/tests/functional_tests/rpc_payment.py +++ b/tests/functional_tests/rpc_payment.py @@ -28,7 +28,6 @@ # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF # THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -from __future__ import print_function import subprocess import os import time diff --git a/tests/functional_tests/sign_message.py b/tests/functional_tests/sign_message.py index 9d6692cf83..9ee5913dcf 100755 --- a/tests/functional_tests/sign_message.py +++ b/tests/functional_tests/sign_message.py @@ -28,8 +28,6 @@ # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF # THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -from __future__ import print_function - """Test message signing/verification RPC calls Test the following RPCs: diff --git a/tests/functional_tests/speed.py b/tests/functional_tests/speed.py index 9f3514a0d0..d1e6aa169d 100755 --- a/tests/functional_tests/speed.py +++ b/tests/functional_tests/speed.py @@ -41,7 +41,6 @@ Test the following RPCs: import time from time import sleep -from __future__ import print_function from framework.daemon import Daemon from framework.wallet import Wallet diff --git a/tests/functional_tests/transfer.py b/tests/functional_tests/transfer.py index 2987ded89f..ef80dc739f 100755 --- a/tests/functional_tests/transfer.py +++ b/tests/functional_tests/transfer.py @@ -28,7 +28,6 @@ # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF # THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -from __future__ import print_function import json import util_resources import pprint diff --git a/tests/functional_tests/txpool.py b/tests/functional_tests/txpool.py index 8e4d9c6ebf..a7b321e8d8 100755 --- a/tests/functional_tests/txpool.py +++ b/tests/functional_tests/txpool.py @@ -28,8 +28,6 @@ # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF # THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -from __future__ import print_function - """Test txpool """ diff --git a/tests/functional_tests/uri.py b/tests/functional_tests/uri.py index 7d42c5ef8b..fb981b3fdc 100755 --- a/tests/functional_tests/uri.py +++ b/tests/functional_tests/uri.py @@ -32,7 +32,6 @@ """Test URI RPC """ -from __future__ import print_function try: from urllib import quote as urllib_quote except: diff --git a/tests/functional_tests/util_resources.py b/tests/functional_tests/util_resources.py index 9c879b27ca..f5ef451663 100755 --- a/tests/functional_tests/util_resources.py +++ b/tests/functional_tests/util_resources.py @@ -34,7 +34,6 @@ by running numerical calculations """ -from __future__ import print_function import subprocess import psutil import os diff --git a/tests/functional_tests/validate_address.py b/tests/functional_tests/validate_address.py index c237ba0c2e..dae4a6e68d 100755 --- a/tests/functional_tests/validate_address.py +++ b/tests/functional_tests/validate_address.py @@ -31,7 +31,6 @@ """Test address validation RPC calls """ -from __future__ import print_function from framework.wallet import Wallet class AddressValidationTest(): diff --git a/tests/functional_tests/wallet.py b/tests/functional_tests/wallet.py index b55a07a702..68ff4ebf89 100755 --- a/tests/functional_tests/wallet.py +++ b/tests/functional_tests/wallet.py @@ -32,7 +32,6 @@ """Test basic wallet functionality """ -from __future__ import print_function import sys import util_resources