Skip to content

Commit

Permalink
Display NumPy and Numba versions when testing
Browse files Browse the repository at this point in the history
  • Loading branch information
mhostetter committed May 9, 2023
1 parent 7dcd6d0 commit 214cd52
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
run: python3 -m pip install --upgrade dist/${{ steps.glob.outputs.paths }}[dev]

- name: Test with pytest
run: python3 -m pytest --showlocals -n auto --cov=galois --cov-report=xml tests/
run: python3 -m pytest -n auto --cov=galois --cov-report=xml tests/

- name: Upload coverage report
uses: codecov/codecov-action@v3
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ profile = "black"

[tool.pytest.ini_options]
minversion = "6.2"
addopts = "-vv --showlocals"
addopts = "-s --showlocals"
testpaths = [
"tests"
]
Expand Down
2 changes: 0 additions & 2 deletions tests/codes/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ def get_filenames(path: pathlib.Path) -> list[str]:

def read_pickle(file):
with open(file, "rb") as f:
# logging.info("Unpickling file %s", file)
print(f"Unpickling file {file}")
dict_ = pickle.load(f)
return dict_

Expand Down
12 changes: 10 additions & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,27 @@
import os
import pickle

import numba
import numpy
import pytest

FOLDER = os.path.join(os.path.dirname(os.path.abspath(__file__)), "data")
import galois

print("\nTested versions:")
print(f" galois: {galois.__version__}")
print(f" numpy: {numpy.__version__}")
print(f" numba: {numba.__version__}")
print()

###############################################################################
# Helper functions
###############################################################################

FOLDER = os.path.join(os.path.dirname(os.path.abspath(__file__)), "data")


def read_pickle(filename):
with open(os.path.join(FOLDER, filename), "rb") as f:
print(f"Loading {f}...")
d = pickle.load(f)
return d

Expand Down
1 change: 0 additions & 1 deletion tests/fields/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@ def read_json(field_folder, filename):
def read_pickle(field_folder, filename):
GF, folder = field_folder
with open(os.path.join(folder, filename), "rb") as f:
print(f"Loading {f}...")
d = pickle.load(f)
return GF, d

Expand Down
1 change: 0 additions & 1 deletion tests/polys/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ def read_pickle(field_folder, filename):
# Convert from folder in fields/data/ to polys/data/
folder = os.path.join(folder, "..", "..", "..", "polys", "data", os.path.basename(folder))
with open(os.path.join(folder, filename), "rb") as f:
print(f"Loading {f}...")
d = pickle.load(f)
return GF, d

Expand Down

0 comments on commit 214cd52

Please sign in to comment.