Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove pdf_cache folder before pytest #65

Merged
merged 4 commits into from
Jul 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion alea/template_source.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import json
import warnings
import logging
import json

import blueice
import numpy as np
Expand Down
1 change: 1 addition & 0 deletions tests/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.coverage
58 changes: 0 additions & 58 deletions tests/_test_VariationConvenience.py

This file was deleted.

216 changes: 0 additions & 216 deletions tests/_test_compute_variation.py

This file was deleted.

10 changes: 10 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import pytest
import shutil


@pytest.fixture(scope='class')
def rm_cache():
dachengx marked this conversation as resolved.
Show resolved Hide resolved
"""Remove pdf_cache directory before and after initializing the TestCase."""
shutil.rmtree('pdf_cache', ignore_errors=True)
dachengx marked this conversation as resolved.
Show resolved Hide resolved
yield
shutil.rmtree('pdf_cache', ignore_errors=True)
2 changes: 2 additions & 0 deletions tests/test_blueice_extended_model.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import pytest
from unittest import TestCase

from blueice.likelihood import LogLikelihoodSum
from alea.utils import load_yaml
from alea.models import BlueiceExtendedModel, CustomAncillaryLikelihood


@pytest.mark.usefixtures('rm_cache')
class TestBlueiceExtendedModel(TestCase):
"""Test of the BlueiceExtendedModel class"""

Expand Down
1 change: 1 addition & 0 deletions tests/test_model.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from alea import StatisticalModel


def test_statistical_model():
try:
error_raised = True
Expand Down