Skip to content
This repository was archived by the owner on May 23, 2023. It is now read-only.

Commit 9656dc8

Browse files
committed
Change travis to run all checks using py 3.5
Also make it run all tests (except those in todo_tests), as they're all passing now!
1 parent eb5795f commit 9656dc8

File tree

5 files changed

+27
-25
lines changed

5 files changed

+27
-25
lines changed

.travis.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
language: python
2-
python: 2.7
2+
python: 3.5
33
sudo: required
44
dist: trusty
55
env:
6-
#matrix:
7-
#- TOX_ENV=py27
8-
#- TOX_ENV=py34
9-
#- TOX_ENV=py35
6+
matrix:
7+
- TOX_ENV=py27
8+
- TOX_ENV=py34
9+
- TOX_ENV=py35
1010
global:
1111
- COVERAGE_APPEND="--append"
1212
- secure: cKbIgpTJ1yjKLBxpCEiT6IH7NShDWZUE+BvnrAfc+ujCsR6LyLJcKxFQmKnWryJCqg7fp82Ep2bF2oDKzanAROar2xDY1SFGbai42seYMaFCw53YPGJ6u3VNCcfT0rN9BWgE7el/m4fjcD6CRsZYKArNNJbMX8csRt3uXXCFLso=
@@ -30,15 +30,15 @@ install:
3030
- travis_retry python setup.py install
3131
- travis_retry pip install -r dev_requirements.txt
3232
script:
33-
# XXX: For now we're only performing minimal CI checks as most tests are
34-
# broken. Tests will be individually added here as they're fixed.
33+
# XXX: For now we're only performing minimal lint checks as there are way
34+
# too many issues. Once they're all addressed we should change this to 'make
35+
# lint'.
3536
- make lint-minimal
36-
- make test-passing
37-
#- if [ -d .tox/$TOX_ENV/ ]; then cd .tox/$TOX_ENV && coverage erase; fi;
38-
#- tox -e $TOX_ENV -- --ignore ethereum/tests/test_vm.py --ignore ethereum/tests/test_state.py
39-
#- tox -e $TOX_ENV -- ethereum/tests/test_vm.py
40-
#- tox -e $TOX_ENV -- ethereum/tests/test_state.py
41-
#- coverage report --show-missing
37+
- if [ -d .tox/$TOX_ENV/ ]; then cd .tox/$TOX_ENV && coverage erase; fi;
38+
- tox -e $TOX_ENV -- --ignore ethereum/tests/test_vm.py --ignore ethereum/tests/test_state.py --ignore ethereum/todo_tests
39+
- tox -e $TOX_ENV -- ethereum/tests/test_vm.py
40+
- tox -e $TOX_ENV -- ethereum/tests/test_state.py
41+
- coverage report --show-missing
4242
after_success:
4343
- travis_retry pip install coveralls
4444
- cd .tox/$TOX_ENV && coveralls

Makefile

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,10 @@ lint-minimal:
4343
python -m flake8 --ignore=F401,F841,F811 --select=F --exclude=todo,experimental,ethash.py,ethash_utils.py ethereum
4444

4545
test:
46-
py.test --tb=no ethereum/tests/
46+
py.test ethereum/tests/
4747

48-
test-passing:
49-
py.test ethereum/tests/test_abi.py ethereum/tests/test_bloom.py ethereum/tests/test_chain.py ethereum/tests/test_compress.py ethereum/tests/test_db.py ethereum/tests/test_difficulty.py ethereum/tests/test_opcodes.py ethereum/tests/test_trie_next_prev.py ethereum/tests/test_genesis.py ethereum/tests/test_serialization.py ethereum/tests/test_trie.py
50-
51-
test-failing:
52-
py.test ethereum/tests/test_blockstransactions.py ethereum/tests/test_transactions.py ethereum/tests/test_keys.py ethereum/tests/test_state.py ethereum/tests/test_contracts.py ethereum/tests/test_tester.py
48+
test-todo:
49+
py.test --continue-on-collection-errors ethereum/todo_tests
5350

5451
testnovm:
5552
py.test --tb=no ethereum/tests/ --ignore=ethereum/tests/test_vm.py

ethereum/pow/chain.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ def get_tx_position(self, tx):
372372
def get_transaction(self, tx):
373373
print('Deprecated. Use get_tx_position')
374374
blknum, index = self.get_tx_position(tx)
375-
blk = self.get_block_by_number(blknum)
375+
blk = self.get_block_by_number(blknum)
376376
return blk.transactions[index], blk, index
377377

378378
# Get descendants of a block
@@ -397,7 +397,7 @@ def get_blockhashes_from_hash(self, hash, max):
397397

398398
header = block.header
399399
hashes = []
400-
for i in xrange(max):
400+
for i in range(max):
401401
hash = header.prevhash
402402
block = self.get_block(hash)
403403
if block is None:

ethereum/slogging.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import logging
22
import json
3+
import sys
34
import textwrap
45
from json.encoder import JSONEncoder
56
from logging import StreamHandler, Formatter, FileHandler
@@ -256,11 +257,15 @@ def getLogger(self, name):
256257

257258

258259
def _stringify_dict_keys(input_):
260+
if sys.version_info.major == 2:
261+
longType = long # NOQA
262+
else:
263+
longType = int
259264
if isinstance(input_, dict):
260265
res = {}
261266
for k, v in input_.items():
262267
v = _stringify_dict_keys(v)
263-
if not isinstance(k, (int, long, bool, None.__class__)):
268+
if not isinstance(k, (int, longType, bool, None.__class__)):
264269
k = str(k)
265270
res[k] = v
266271
elif isinstance(input_, (list, tuple)):

ethereum/utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929
SECP256K1P = 2**256 - 4294968273
3030

3131
if sys.version_info.major == 2:
32-
is_numeric = lambda x: isinstance(x, (int, long))
33-
is_string = lambda x: isinstance(x, (str, unicode))
32+
is_numeric = lambda x: isinstance(x, (int, long)) # NOQA
33+
is_string = lambda x: isinstance(x, (str, unicode)) # NOQA
3434

3535
def to_string(value):
3636
return str(value)
@@ -42,7 +42,7 @@ def int_to_bytes(value):
4242

4343
def to_string_for_regexp(value):
4444
return str(value)
45-
unicode = unicode
45+
unicode = unicode # NOQA
4646

4747
def bytearray_to_bytestr(value):
4848
return bytes(''.join(chr(c) for c in value))

0 commit comments

Comments
 (0)