Skip to content

Commit

Permalink
Add more detailed debugging message
Browse files Browse the repository at this point in the history
  • Loading branch information
elinscott committed Oct 4, 2024
1 parent e29cff7 commit 5ce387a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/koopmans/files.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def __eq__(self, other):
if not isinstance(other, FilePointer):
return False
# Note that we don't check self.parent.absolute_directory
return self.parent.directory == other.parent.directory and self.name == other.name
return self.absolute_directory == other.absolute_directory and self.name == other.name

def __reduce__(self):
# We don't want to store the entire parent object in the database; we only need the directory information
Expand Down
8 changes: 4 additions & 4 deletions tests/helpers/patches/_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,10 +348,10 @@ def _run(self):
utils.warn(f'Inputs differ from the benchmark')
for k in self.inputs.model_fields:
utils.warn(f'Input {k} differs')
for x in getattr(self.inputs, k):
utils.warn(f'input {k}: {x}')
for x in getattr(bench_process.inputs, k):
utils.warn(f'bench {k}: {x}')
utils.warn('input has ' + ', '.join([x.name for x in getattr(self.inputs, k)]))
utils.warn('bench has ' + ', '.join([x.name for x in getattr(bench_process.inputs, k)]))
for x, y in zip(getattr(self.inputs, k), getattr(bench_process.inputs, k)):
utils.warn(f'input {k}: {x} != {y}')
raise ValueError()

unpatched_run(self)
Expand Down

0 comments on commit 5ce387a

Please sign in to comment.