Skip to content

Commit

Permalink
Merge pull request #9529
Browse files Browse the repository at this point in the history
484ece1 tests: remove python2 compatibility (tobtoht)
  • Loading branch information
luigi1111 committed Dec 23, 2024
2 parents 2830295 + 484ece1 commit d42bba7
Show file tree
Hide file tree
Showing 28 changed files with 7 additions and 37 deletions.
3 changes: 1 addition & 2 deletions tests/block_weight/block_weight.py
Original file line number Diff line number Diff line change
@@ -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

Expand Down
3 changes: 1 addition & 2 deletions tests/block_weight/compare.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/env python
#!/usr/bin/env python3

from __future__ import print_function
import sys
import subprocess

Expand Down
3 changes: 1 addition & 2 deletions tests/difficulty/gen_wide_data.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/env python
#!/usr/bin/env python3

from __future__ import print_function
import random

DIFFICULTY_TARGET = 120
Expand Down
2 changes: 1 addition & 1 deletion tests/difficulty/generate-data
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python3
#!/usr/bin/env python3

# Copyright (c) 2014-2024, The Monero Project
#
Expand Down
3 changes: 1 addition & 2 deletions tests/difficulty/wide_difficulty.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/env python
#!/usr/bin/env python3

from __future__ import print_function
import sys
import subprocess

Expand Down
1 change: 0 additions & 1 deletion tests/functional_tests/address_book.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
"""Test wallet address book RPC
"""

from __future__ import print_function
from framework.wallet import Wallet

class AddressBookTest():
Expand Down
1 change: 0 additions & 1 deletion tests/functional_tests/bans.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion tests/functional_tests/blockchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions tests/functional_tests/check_missing_rpc_methods.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/env python
#!/usr/bin/env python3

from __future__ import print_function
import sys
import re

Expand Down
1 change: 0 additions & 1 deletion tests/functional_tests/cold_signing.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion tests/functional_tests/daemon_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
"""

from __future__ import print_function
import os
from framework.daemon import Daemon

Expand Down
3 changes: 1 addition & 2 deletions tests/functional_tests/functional_tests_rpc.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/env python
#!/usr/bin/env python3

from __future__ import print_function
import sys
import time
import subprocess
Expand Down
1 change: 0 additions & 1 deletion tests/functional_tests/get_output_distribution.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
"""Test get_output_distribution RPC
"""

from __future__ import print_function
from framework.daemon import Daemon
from framework.wallet import Wallet

Expand Down
1 change: 0 additions & 1 deletion tests/functional_tests/integrated_address.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
"""

from __future__ import print_function
from framework.wallet import Wallet

class IntegratedAddressTest():
Expand Down
1 change: 0 additions & 1 deletion tests/functional_tests/k_anonymity.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 0 additions & 1 deletion tests/functional_tests/mining.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion tests/functional_tests/multisig.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion tests/functional_tests/p2p.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions tests/functional_tests/proofs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
"""

Expand Down
1 change: 0 additions & 1 deletion tests/functional_tests/rpc_payment.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions tests/functional_tests/sign_message.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
1 change: 0 additions & 1 deletion tests/functional_tests/speed.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@

import time
from time import sleep
from __future__ import print_function

from framework.daemon import Daemon
from framework.wallet import Wallet
Expand Down
1 change: 0 additions & 1 deletion tests/functional_tests/transfer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions tests/functional_tests/txpool.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
"""

Expand Down
1 change: 0 additions & 1 deletion tests/functional_tests/uri.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
"""Test URI RPC
"""

from __future__ import print_function
try:
from urllib import quote as urllib_quote
except:
Expand Down
1 change: 0 additions & 1 deletion tests/functional_tests/util_resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
by running numerical calculations
"""

from __future__ import print_function
import subprocess
import psutil
import os
Expand Down
1 change: 0 additions & 1 deletion tests/functional_tests/validate_address.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
"""Test address validation RPC calls
"""

from __future__ import print_function
from framework.wallet import Wallet

class AddressValidationTest():
Expand Down
1 change: 0 additions & 1 deletion tests/functional_tests/wallet.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
"""Test basic wallet functionality
"""

from __future__ import print_function
import sys
import util_resources

Expand Down

0 comments on commit d42bba7

Please sign in to comment.