Skip to content

Commit

Permalink
Parallelize pytests
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewcarbone committed Oct 8, 2023
1 parent cc65b25 commit 0bbb05d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
- name: Run tests
run: |
pytest -v --cov --cov-report xml lightshow/_tests
pytest -n auto -v --cov --cov-report xml lightshow/_tests
- name: Upload code coverage
uses: codecov/codecov-action@v2
Expand Down
2 changes: 1 addition & 1 deletion lightshow/_tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def _database_for_stress_test():
# return Database.from_materials_project(material_ids=["mp-980945"])
db = Database.from_materials_project(chemsys=["Ti-*", "Mn-O-*"])
# db = Database.from_materials_project(material_ids=["mp-390"])
keys = list(db._structures.keys())
keys = sorted(list(db._structures.keys()))
# random.seed(123)
# keys = random.sample(keys, 200)
db._structures = {key: db._structures[key] for key in keys}
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ test = [
"coverage",
"flake8",
"pytest",
"pytest-xdist==3.3.1",
"pytest-cov",
"black",
"nbstripout",
Expand Down

0 comments on commit 0bbb05d

Please sign in to comment.