Skip to content

Commit ee32e4e

Browse files
committed
[feat] rename df to biopandas_structure
1 parent e4a240a commit ee32e4e

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

biopandas/mmcif/tests/test_multiple_models.py

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,20 @@
1111
TESTDATA_FILENAME = os.path.join(os.path.dirname(__file__), "data", "2jyf.cif.gz")
1212

1313
def test_label_models():
14-
df = PandasMmcif().read_mmcif(TESTDATA_FILENAME)
15-
df.label_models()
16-
assert "model_id" in df.df["ATOM"].columns
17-
14+
biopandas_structure = PandasMmcif().read_mmcif(TESTDATA_FILENAME)
15+
biopandas_structure.label_models()
16+
assert "model_id" in biopandas_structure.df["ATOM"].columns
17+
1818
def test_get_model():
19-
df = PandasMmcif().read_mmcif(TESTDATA_FILENAME)
19+
biopandas_structure = PandasMmcif().read_mmcif(TESTDATA_FILENAME)
2020
MODEL_INDEX = 1
21-
new_df = df.get_model(MODEL_INDEX)
22-
print(df)
23-
assert new_df.df["ATOM"]["pdbx_PDB_model_num"].all() == MODEL_INDEX
21+
new_biopandas_structure = biopandas_structure.get_model(MODEL_INDEX)
22+
assert new_biopandas_structure.df["ATOM"]["pdbx_PDB_model_num"].all() == MODEL_INDEX
2423

2524

2625
def test_get_models():
27-
df = PandasMmcif().read_mmcif(TESTDATA_FILENAME)
26+
biopandas_structure = PandasMmcif().read_mmcif(TESTDATA_FILENAME)
2827
MODEL_INDICES = [1, 3, 5]
2928

30-
new_df = df.get_models(MODEL_INDICES)
31-
assert new_df.df["ATOM"]["pdbx_PDB_model_num"].all() in MODEL_INDICES
29+
new_biopandas_structure = biopandas_structure.get_models(MODEL_INDICES)
30+
assert new_biopandas_structure.df["ATOM"]["pdbx_PDB_model_num"].all() in MODEL_INDICES

0 commit comments

Comments
 (0)