Skip to content

Commit

Permalink
add python 3.7 test run support
Browse files Browse the repository at this point in the history
  • Loading branch information
Irlirion committed Jul 20, 2024
1 parent 7c1c146 commit 19c3b20
Show file tree
Hide file tree
Showing 23 changed files with 138 additions and 23 deletions.
7 changes: 6 additions & 1 deletion tests/mmcif/test_amino3to1.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@
# Project Website: http://rasbt.github.io/biopandas/
# Code Repository: https://github.com/rasbt/biopandas

import importlib.resources as pkg_resources
import sys

if sys.version_info >= (3, 9):
import importlib.resources as pkg_resources
else:
import importlib_resources as pkg_resources

import numpy as np

Expand Down
7 changes: 6 additions & 1 deletion tests/mmcif/test_assign_df.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@
# Project Website: http://rasbt.github.io/biopandas/
# Code Repository: https://github.com/rasbt/biopandas

import importlib.resources as pkg_resources
import sys

if sys.version_info >= (3, 9):
import importlib.resources as pkg_resources
else:
import importlib_resources as pkg_resources

import tests.mmcif.data
from biopandas.mmcif import PandasMmcif
Expand Down
7 changes: 6 additions & 1 deletion tests/mmcif/test_distance.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@
# Project Website: http://rasbt.github.io/biopandas/
# Code Repository: https://github.com/rasbt/biopandas

import importlib.resources as pkg_resources
import sys

if sys.version_info >= (3, 9):
import importlib.resources as pkg_resources
else:
import importlib_resources as pkg_resources

import pandas as pd

Expand Down
7 changes: 6 additions & 1 deletion tests/mmcif/test_multiple_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@
# License: BSD 3 clause
# Project Website: http://rasbt.github.io/biopandas/
# Code Repository: https://github.com/rasbt/biopandas
import importlib.resources as pkg_resources
import sys

if sys.version_info >= (3, 9):
import importlib.resources as pkg_resources
else:
import importlib_resources as pkg_resources

import tests.mmcif.data
from biopandas.mmcif import PandasMmcif
Expand Down
7 changes: 6 additions & 1 deletion tests/mmcif/test_read_mmcif.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@
# Code Repository: https://github.com/rasbt/biopandas


import importlib.resources as pkg_resources
import sys

if sys.version_info >= (3, 9):
import importlib.resources as pkg_resources
else:
import importlib_resources as pkg_resources
from pathlib import Path
from urllib.error import HTTPError

Expand Down
7 changes: 6 additions & 1 deletion tests/mmcif/test_rmsd.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@
# Project Website: http://rasbt.github.io/biopandas/
# Code Repository: https://github.com/rasbt/biopandas

import importlib.resources as pkg_resources
import sys

if sys.version_info >= (3, 9):
import importlib.resources as pkg_resources
else:
import importlib_resources as pkg_resources

import pytest

Expand Down
7 changes: 6 additions & 1 deletion tests/mmtf/test_amino3to1.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@
# Project Website: http://rasbt.github.io/biopandas/
# Code Repository: https://github.com/rasbt/biopandas

import importlib.resources as pkg_resources
import sys

if sys.version_info >= (3, 9):
import importlib.resources as pkg_resources
else:
import importlib_resources as pkg_resources

import numpy as np

Expand Down
7 changes: 6 additions & 1 deletion tests/mmtf/test_assign_df.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@
# Project Website: http://rasbt.github.io/biopandas/
# Code Repository: https://github.com/rasbt/biopandas

import importlib.resources as pkg_resources
import sys

if sys.version_info >= (3, 9):
import importlib.resources as pkg_resources
else:
import importlib_resources as pkg_resources

import tests.mmtf.data
from biopandas.mmtf import PandasMmtf
Expand Down
7 changes: 6 additions & 1 deletion tests/mmtf/test_distance.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@
# Project Website: http://rasbt.github.io/biopandas/
# Code Repository: https://github.com/rasbt/biopandas

import importlib.resources as pkg_resources
import sys

if sys.version_info >= (3, 9):
import importlib.resources as pkg_resources
else:
import importlib_resources as pkg_resources

import pandas as pd

Expand Down
7 changes: 6 additions & 1 deletion tests/mmtf/test_multiple_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@
# Project Website: http://rasbt.github.io/biopandas/
# Code Repository: https://github.com/rasbt/biopandas

import importlib.resources as pkg_resources
import sys

if sys.version_info >= (3, 9):
import importlib.resources as pkg_resources
else:
import importlib_resources as pkg_resources
import os

from pandas.testing import assert_frame_equal
Expand Down
7 changes: 6 additions & 1 deletion tests/mmtf/test_read_mmtf.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@
# Project Website: http://rasbt.github.io/biopandas/
# Code Repository: https://github.com/rasbt/biopandas

import importlib.resources as pkg_resources
import sys

if sys.version_info >= (3, 9):
import importlib.resources as pkg_resources
else:
import importlib_resources as pkg_resources
import unittest

import pandas as pd
Expand Down
7 changes: 6 additions & 1 deletion tests/mmtf/test_rmsd.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@
# Project Website: http://rasbt.github.io/biopandas/
# Code Repository: https://github.com/rasbt/biopandas

import importlib.resources as pkg_resources
import sys

if sys.version_info >= (3, 9):
import importlib.resources as pkg_resources
else:
import importlib_resources as pkg_resources

import pytest

Expand Down
7 changes: 6 additions & 1 deletion tests/mol2/test_mol2_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@
# Project Website: http://rasbt.github.io/biopandas/
# Code Repository: https://github.com/rasbt/biopandas

import importlib.resources as pkg_resources
import sys

if sys.version_info >= (3, 9):
import importlib.resources as pkg_resources
else:
import importlib_resources as pkg_resources

import tests.mol2.data
from biopandas.mol2.mol2_io import split_multimol2
Expand Down
7 changes: 6 additions & 1 deletion tests/mol2/test_pandas_mol2.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@
# Project Website: http://rasbt.github.io/biopandas/
# Code Repository: https://github.com/rasbt/biopandas

import importlib.resources as pkg_resources
import sys

if sys.version_info >= (3, 9):
import importlib.resources as pkg_resources
else:
import importlib_resources as pkg_resources

import tests.mol2.data
from biopandas.mol2 import PandasMol2
Expand Down
7 changes: 6 additions & 1 deletion tests/pdb/test_amino3to1.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@
# Project Website: http://rasbt.github.io/biopandas/
# Code Repository: https://github.com/rasbt/biopandas

import importlib.resources as pkg_resources
import sys

if sys.version_info >= (3, 9):
import importlib.resources as pkg_resources
else:
import importlib_resources as pkg_resources

import numpy as np

Expand Down
7 changes: 6 additions & 1 deletion tests/pdb/test_assign_df.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@
# Project Website: http://rasbt.github.io/biopandas/
# Code Repository: https://github.com/rasbt/biopandas

import importlib.resources as pkg_resources
import sys

if sys.version_info >= (3, 9):
import importlib.resources as pkg_resources
else:
import importlib_resources as pkg_resources

import tests.pdb.data
from biopandas.pdb import PandasPdb
Expand Down
7 changes: 6 additions & 1 deletion tests/pdb/test_distance.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@
# Project Website: http://rasbt.github.io/biopandas/
# Code Repository: https://github.com/rasbt/biopandas

import importlib.resources as pkg_resources
import sys

if sys.version_info >= (3, 9):
import importlib.resources as pkg_resources
else:
import importlib_resources as pkg_resources

import pandas as pd

Expand Down
7 changes: 6 additions & 1 deletion tests/pdb/test_gyradius.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@
# Code Repository: https://github.com/rasbt/biopandas


import importlib.resources as pkg_resources
import sys

if sys.version_info >= (3, 9):
import importlib.resources as pkg_resources
else:
import importlib_resources as pkg_resources

import pytest

Expand Down
7 changes: 6 additions & 1 deletion tests/pdb/test_impute.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@
# Code Repository: https://github.com/rasbt/biopandas


import importlib.resources as pkg_resources
import sys

if sys.version_info >= (3, 9):
import importlib.resources as pkg_resources
else:
import importlib_resources as pkg_resources

import tests.pdb.data
from biopandas.pdb import PandasPdb
Expand Down
7 changes: 6 additions & 1 deletion tests/pdb/test_multiple_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@
# License: BSD 3 clause
# Project Website: http://rasbt.github.io/biopandas/
# Code Repository: https://github.com/rasbt/biopandas
import importlib.resources as pkg_resources
import sys

if sys.version_info >= (3, 9):
import importlib.resources as pkg_resources
else:
import importlib_resources as pkg_resources

import tests.pdb.data
from biopandas.pdb import PandasPdb
Expand Down
7 changes: 6 additions & 1 deletion tests/pdb/test_read_pdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@
# Code Repository: https://github.com/rasbt/biopandas


import importlib.resources as pkg_resources
import sys

if sys.version_info >= (3, 9):
import importlib.resources as pkg_resources
else:
import importlib_resources as pkg_resources
import os
from urllib.error import HTTPError

Expand Down
7 changes: 6 additions & 1 deletion tests/pdb/test_rmsd.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@
# Project Website: http://rasbt.github.io/biopandas/
# Code Repository: https://github.com/rasbt/biopandas

import importlib.resources as pkg_resources
import sys

if sys.version_info >= (3, 9):
import importlib.resources as pkg_resources
else:
import importlib_resources as pkg_resources

import pytest

Expand Down
7 changes: 6 additions & 1 deletion tests/pdb/test_write_pdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@
# Project Website: http://rasbt.github.io/biopandas/
# Code Repository: https://github.com/rasbt/biopandas

import importlib.resources as pkg_resources
import sys

if sys.version_info >= (3, 9):
import importlib.resources as pkg_resources
else:
import importlib_resources as pkg_resources
import os
import warnings

Expand Down

0 comments on commit 19c3b20

Please sign in to comment.