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 # Simulate a maximal block attack on the Monero network
# This uses the scheme proposed by ArticMine # This uses the scheme proposed by ArticMine
# Written by Sarang Nother # Written by Sarang Nother
# Copyright (c) 2019-2024, The Monero Project # Copyright (c) 2019-2024, The Monero Project
from __future__ import print_function
import sys import sys
import math import math

View File

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

View File

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

View File

@ -1,4 +1,4 @@
#!/usr/bin/python3 #!/usr/bin/env python3
# Copyright (c) 2014-2024, The Monero Project # 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 sys
import subprocess import subprocess

View File

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

View File

@ -28,7 +28,6 @@
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF # 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. # THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
from __future__ import print_function
import time import time
"""Test peer baning RPC calls """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 # 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. # THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
from __future__ import print_function
import time import time
"""Test daemon blockchain RPC calls """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 sys
import re import re

View File

@ -31,7 +31,6 @@
"""Test cold tx signing """Test cold tx signing
""" """
from __future__ import print_function
from framework.daemon import Daemon from framework.daemon import Daemon
from framework.wallet import Wallet from framework.wallet import Wallet
import random import random

View File

@ -37,7 +37,6 @@ Test the following RPCs:
""" """
from __future__ import print_function
import os import os
from framework.daemon import Daemon 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 sys
import time import time
import subprocess import subprocess

View File

@ -31,7 +31,6 @@
"""Test get_output_distribution RPC """Test get_output_distribution RPC
""" """
from __future__ import print_function
from framework.daemon import Daemon from framework.daemon import Daemon
from framework.wallet import Wallet 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 from framework.wallet import Wallet
class IntegratedAddressTest(): class IntegratedAddressTest():

View File

@ -28,7 +28,6 @@
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF # 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. # THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
from __future__ import print_function
import math import math
import random import random

View File

@ -29,7 +29,6 @@
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF # 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. # THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
from __future__ import print_function
import time import time
import os import os
import math import math

View File

@ -28,7 +28,6 @@
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF # 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. # THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
from __future__ import print_function
import random import random
"""Test multisig transfers """Test multisig transfers

View File

@ -29,7 +29,6 @@
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF # 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. # THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
from __future__ import print_function
import time import time
"""Test daemon P2P """Test daemon P2P

View File

@ -28,8 +28,6 @@
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF # 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. # 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) """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 # 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. # THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
from __future__ import print_function
import subprocess import subprocess
import os import os
import time import time

View File

@ -28,8 +28,6 @@
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF # 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. # 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 message signing/verification RPC calls
Test the following RPCs: Test the following RPCs:

View File

@ -41,7 +41,6 @@ Test the following RPCs:
import time import time
from time import sleep from time import sleep
from __future__ import print_function
from framework.daemon import Daemon from framework.daemon import Daemon
from framework.wallet import Wallet 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 # 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. # THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
from __future__ import print_function
import json import json
import util_resources import util_resources
import pprint import pprint

View File

@ -28,8 +28,6 @@
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF # 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. # THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
from __future__ import print_function
"""Test txpool """Test txpool
""" """

View File

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

View File

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

View File

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

View File

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