Skip to content

Commit

Permalink
Collect data file for eth_utils.network.
Browse files Browse the repository at this point in the history
  • Loading branch information
bwoodsend committed Oct 23, 2023
1 parent 8e0e0b1 commit 98c8de2
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 0 deletions.
1 change: 1 addition & 0 deletions news/656.new.1.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add hook for ``eth_utils`` to collect its embedded JSON files.
1 change: 1 addition & 0 deletions requirements-test-libraries.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ dash-uploader==0.6.0
# We install it via apt-get and brew on ubuntu and macOS CI runners, respectively.
discid==1.2.0; sys_platform != 'win32'
eth_typing==3.5.1
eth_utils==2.3.0
fabric==3.2.2
fiona==1.9.5; sys_platform != 'win32'
folium==0.14.0
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# ------------------------------------------------------------------
# Copyright (c) 2020 PyInstaller Development Team.
#
# This file is distributed under the terms of the GNU General Public
# License (version 2.0 or later).
#
# The full license is available in LICENSE.GPL.txt, distributed with
# this software.
#
# SPDX-License-Identifier: GPL-2.0-or-later
# ------------------------------------------------------------------

from PyInstaller.utils.hooks import collect_data_files

datas = collect_data_files("eth_utils")
8 changes: 8 additions & 0 deletions src/_pyinstaller_hooks_contrib/tests/test_libraries.py
Original file line number Diff line number Diff line change
Expand Up @@ -647,6 +647,14 @@ def test_eth_typing(pyi_builder):
""")


@importorskip("eth_utils")
def test_eth_utils_network(pyi_builder):
pyi_builder.test_source("""
import eth_utils.network
eth_utils.network.name_from_chain_id(1)
""")


@importorskip('plotly')
@importorskip('pandas')
def test_plotly(pyi_builder):
Expand Down

0 comments on commit 98c8de2

Please sign in to comment.