Skip to content

Commit

Permalink
Merge pull request #353 from tovrstra/drop-warning-catchall
Browse files Browse the repository at this point in the history
Remove useless catch_warnings
  • Loading branch information
tovrstra authored Jun 28, 2024
2 parents 03bf3e6 + b335004 commit 8cf1132
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
7 changes: 1 addition & 6 deletions iodata/test/test_molden.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
"""Test iodata.formats.molden module."""

import os
import warnings
from contextlib import ExitStack
from importlib.resources import as_file, files

Expand Down Expand Up @@ -70,11 +69,7 @@ def test_load_molden_li2_orca():


def test_load_molden_li2_orca_huge_threshold():
with (
as_file(files("iodata.test.data").joinpath("li2.molden.input")) as fn_molden,
warnings.catch_warnings(),
):
warnings.simplefilter("error")
with as_file(files("iodata.test.data").joinpath("li2.molden.input")) as fn_molden:
# The threshold is set very high, which skip a correction for ORCA.
load_one(str(fn_molden), norm_threshold=1e4)

Expand Down
5 changes: 1 addition & 4 deletions iodata/test/test_molekel.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,10 +156,7 @@ def test_load_mkl_h2():


def test_load_mkl_h2_huge_threshold():
with (
as_file(files("iodata.test.data").joinpath("h2_sto3g.mkl")) as fn_molekel,
warnings.catch_warnings(),
):
with as_file(files("iodata.test.data").joinpath("h2_sto3g.mkl")) as fn_molekel:
warnings.simplefilter("error")
# The threshold is set very high, which skip a correction for ORCA.
load_one(str(fn_molekel), norm_threshold=1e4)
Expand Down

0 comments on commit 8cf1132

Please sign in to comment.