Skip to content

Commit

Permalink
Consolidate test data (#473)
Browse files Browse the repository at this point in the history
* Update gitignore
* Remove repositories submodule
* Move files repositories/tests/data to utils/test_data
* Update setup.cfg
  • Loading branch information
itziakos authored Aug 21, 2024
1 parent 3db87e8 commit 89d57a7
Show file tree
Hide file tree
Showing 29 changed files with 11 additions and 9 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
.env
.tox
dist/*
.hypothesis/
build/
okonomiyaki/_version.py
*.egg-info
*.pyc
13 changes: 6 additions & 7 deletions okonomiyaki/file_formats/tests/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
import io
import os.path

from okonomiyaki import repositories
from okonomiyaki import utils

DATA_DIR = os.path.join(
os.path.dirname(repositories.__file__), "tests", "data")
os.path.dirname(utils.__file__), "test_data", "eggs")

ENSTALLER_EGG = os.path.join(DATA_DIR, "enstaller-4.5.0-1.egg")
ETS_EGG = os.path.join(DATA_DIR, "ets-4.3.0-3.egg")
Expand All @@ -28,14 +28,13 @@
# (see dcdd2492066b9a88e1cf39459c3fff99589f789d in buildsystem).
# In most of those cases, the PKG-INFO is instead written as
# EGG-INFO/PKG-INFO.bak (don't ask).
BROKEN_MCCABE_EGG = os.path.join(DATA_DIR, "broken_legacy_eggs",
"mccabe-0.2.1-2.egg")
BROKEN_MCCABE_EGG = os.path.join(
DATA_DIR, "broken_legacy_eggs", "mccabe-0.2.1-2.egg")

UNICODE_DESCRIPTION_EGG = os.path.join(DATA_DIR, "pymongo-2.8-1.egg")
with io.open(
os.path.join(DATA_DIR, "pymongo_description.txt"),
"r", encoding="utf8"
) as fp:
os.path.join(DATA_DIR, "pymongo_description.txt"),
"r", encoding="utf8") as fp:
UNICODE_DESCRIPTION_TEXT = fp.read()

# flake8: noqa
Expand Down
Empty file.
Empty file.
Binary file not shown.
5 changes: 3 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ packages =
okonomiyaki.file_formats._blacklist
okonomiyaki.platforms
okonomiyaki.platforms.tests
okonomiyaki.repositories
okonomiyaki.repositories.tests
okonomiyaki.runtimes
okonomiyaki.runtimes.tests
okonomiyaki.versions
Expand All @@ -55,6 +53,8 @@ okonomiyaki.repositories.tests =
okonomiyaki.utils.test_data =
*.runtime
*.runtime.invalid
eggs/*.egg
eggs/*.txt
eggs/osx_arm64/cp311/*.egg
eggs/osx_x86_64/cp27/*.egg
eggs/osx_x86_64/cp38/*.egg
Expand All @@ -69,6 +69,7 @@ okonomiyaki.utils.test_data =
eggs/win_x86_64/cp38/*.egg
eggs/win_x86_64/cp311/*.egg
eggs/win_arm64/cp311/*.egg
eggs/broken_legacy_eggs/*.egg
wheels/*.whl

[options.extras_require]
Expand Down

0 comments on commit 89d57a7

Please sign in to comment.