Skip to content

Commit

Permalink
Fix data dir for pytest
Browse files Browse the repository at this point in the history
  • Loading branch information
thalassemia committed Dec 5, 2024
1 parent b2f25fd commit b793f56
Show file tree
Hide file tree
Showing 8 changed files with 6 additions and 2 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 5 additions & 1 deletion test/negative_counts.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
import json
import os

from stochastic_arrow import StochasticSystem
import numpy as np


duration = 2**31

with open('data/complexation/large-initial.json') as f:
# Build the path to the data file relative to the script's directory
data_path = os.path.join(os.path.dirname(__file__), 'data', 'complexation', 'large-initial.json')

with open(data_path) as f:
data = json.load(f)

stoich = np.array(data['stoich'])
Expand Down
2 changes: 1 addition & 1 deletion test/test_arrow.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def test_dimerization():


def load_complexation(prefix='simple'):
fixtures_root = os.path.join('data', 'complexation')
fixtures_root = os.path.join(os.path.dirname(__file__), 'data', 'complexation')

def load_state(filename):
with open(os.path.join(fixtures_root, filename)) as f:
Expand Down

0 comments on commit b793f56

Please sign in to comment.