Skip to content

Commit

Permalink
Update dependencies versions
Browse files Browse the repository at this point in the history
  • Loading branch information
medvedev1088 committed Mar 26, 2019
1 parent 3483d77 commit 302fbc9
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 18 deletions.
7 changes: 4 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,16 @@ def read(fname):
'eth-abi==1.2.0',
# TODO: This has to be removed when "ModuleNotFoundError: No module named 'eth_utils.toolz'" is fixed at eth-abi
'python-dateutil==2.7.0',
'click==6.7',
'click==7.0',
'ethereum-dasm==0.1.4'
],
extras_require={
'streaming': [
'google-cloud-pubsub==0.37.2'
'google-cloud-pubsub==0.39.1'
],
'dev': [
'pytest~=3.2.0',
'pytest~=4.3.0',
'pytest-timeout~=1.3.3'
]
},
entry_points={
Expand Down
24 changes: 10 additions & 14 deletions tests/ethereumetl/service/test_eth_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,12 @@
from tests.helpers import skip_if_slow_tests_disabled


@skip_if_slow_tests_disabled
@pytest.mark.parametrize("date,expected_start_block,expected_end_block", [
('2015-07-30', 0, 6911),
('2015-07-31', 6912, 13774),
('2017-01-01', 2912407, 2918517),
('2017-01-02', 2918518, 2924575),
('2018-06-10', 5761663, 5767303)
skip_if_slow_tests_disabled(['2015-07-30', 0, 6911]),
skip_if_slow_tests_disabled(['2015-07-31', 6912, 13774]),
skip_if_slow_tests_disabled(['2017-01-01', 2912407, 2918517]),
skip_if_slow_tests_disabled(['2017-01-02', 2918518, 2924575]),
skip_if_slow_tests_disabled(['2018-06-10', 5761663, 5767303])
])
def test_get_block_range_for_date(date, expected_start_block, expected_end_block):
eth_service = get_new_eth_service()
Expand All @@ -45,10 +44,9 @@ def test_get_block_range_for_date(date, expected_start_block, expected_end_block
assert blocks == (expected_start_block, expected_end_block)


@skip_if_slow_tests_disabled
@pytest.mark.parametrize("date", [
'2015-07-29',
'2030-01-01'
skip_if_slow_tests_disabled(['2015-07-29']),
skip_if_slow_tests_disabled(['2030-01-01'])
])
def test_get_block_range_for_date_fail(date):
eth_service = get_new_eth_service()
Expand All @@ -57,20 +55,18 @@ def test_get_block_range_for_date_fail(date):
eth_service.get_block_range_for_date(parsed_date)


@skip_if_slow_tests_disabled
@pytest.mark.parametrize("start_timestamp,end_timestamp,expected_start_block,expected_end_block", [
(1438270128, 1438270128, 10, 10),
(1438270128, 1438270129, 10, 10)
skip_if_slow_tests_disabled([1438270128, 1438270128, 10, 10]),
skip_if_slow_tests_disabled([1438270128, 1438270129, 10, 10])
])
def test_get_block_range_for_timestamps(start_timestamp, end_timestamp, expected_start_block, expected_end_block):
eth_service = get_new_eth_service()
blocks = eth_service.get_block_range_for_timestamps(start_timestamp, end_timestamp)
assert blocks == (expected_start_block, expected_end_block)


@skip_if_slow_tests_disabled
@pytest.mark.parametrize("start_timestamp,end_timestamp", [
(1438270129, 1438270131)
skip_if_slow_tests_disabled([1438270129, 1438270131])
])
def test_get_block_range_for_timestamps_fail(start_timestamp, end_timestamp):
eth_service = get_new_eth_service()
Expand Down
5 changes: 4 additions & 1 deletion tests/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,7 @@ def read_file(path):

run_slow_tests_variable = os.environ.get('ETHEREUM_ETL_RUN_SLOW_TESTS', 'False')
run_slow_tests = run_slow_tests_variable.lower() in ['1', 'true', 'yes']
skip_if_slow_tests_disabled = pytest.mark.skipif(not run_slow_tests, reason='Skipping slow running tests')


def skip_if_slow_tests_disabled(data):
return pytest.param(*data, marks=pytest.mark.skipif(not run_slow_tests, reason='Skipping slow running tests'))

0 comments on commit 302fbc9

Please sign in to comment.