tests: remove python2 compatibility

This commit is contained in:
tobtoht 2024-10-23 14:09:59 +02:00
parent 893916ad09
commit 484ece1c08
No known key found for this signature in database
GPG Key ID: E45B10DD027D2472
28 changed files with 7 additions and 37 deletions

View File

@ -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

View File

@ -1,6 +1,5 @@
#!/usr/bin/env python
#!/usr/bin/env python3
from __future__ import print_function
import sys
import subprocess

View File

@ -1,6 +1,5 @@
#!/usr/bin/env python
#!/usr/bin/env python3
from __future__ import print_function
import random
DIFFICULTY_TARGET = 120

View File

@ -1,4 +1,4 @@
#!/usr/bin/python3
#!/usr/bin/env python3
# Copyright (c) 2014-2024, The Monero Project
#

View File

@ -1,6 +1,5 @@
#!/usr/bin/env python
#!/usr/bin/env python3
from __future__ import print_function
import sys
import subprocess

View File

@ -32,7 +32,6 @@
"""Test wallet address book RPC
"""
from __future__ import print_function
from framework.wallet import Wallet
class AddressBookTest():

View File

@ -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

View File

@ -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

View File

@ -1,6 +1,5 @@
#!/usr/bin/env python
#!/usr/bin/env python3
from __future__ import print_function
import sys
import re

View File

@ -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

View File

@ -37,7 +37,6 @@ Test the following RPCs:
"""
from __future__ import print_function
import os
from framework.daemon import Daemon

View File

@ -1,6 +1,5 @@
#!/usr/bin/env python
#!/usr/bin/env python3
from __future__ import print_function
import sys
import time
import subprocess

View File

@ -31,7 +31,6 @@
"""Test get_output_distribution RPC
"""
from __future__ import print_function
from framework.daemon import Daemon
from framework.wallet import Wallet

View File

@ -36,7 +36,6 @@ Test the following RPCs:
"""
from __future__ import print_function
from framework.wallet import Wallet
class IntegratedAddressTest():

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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)
"""

View File

@ -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

View File

@ -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:

View File

@ -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

View File

@ -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

View File

@ -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
"""

View File

@ -32,7 +32,6 @@
"""Test URI RPC
"""
from __future__ import print_function
try:
from urllib import quote as urllib_quote
except:

View File

@ -34,7 +34,6 @@
by running numerical calculations
"""
from __future__ import print_function
import subprocess
import psutil
import os

View File

@ -31,7 +31,6 @@
"""Test address validation RPC calls
"""
from __future__ import print_function
from framework.wallet import Wallet
class AddressValidationTest():

View File

@ -32,7 +32,6 @@
"""Test basic wallet functionality
"""
from __future__ import print_function
import sys
import util_resources