Skip to content

Commit c1cfaac

Browse files
authored
Use consistent names for pytest fixtures (#1965)
1 parent d73001a commit c1cfaac

21 files changed

+32
-32
lines changed

pygmt/tests/test_clib.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
2828
POINTS_DATA = os.path.join(TEST_DATA_DIR, "points.txt")
2929

3030

31-
@pytest.fixture(scope="module")
32-
def data():
31+
@pytest.fixture(scope="module", name="data")
32+
def fixture_data():
3333
"""
3434
Load the point data from the test file.
3535
"""

pygmt/tests/test_contour.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,16 @@
1414
POINTS_DATA = os.path.join(TEST_DATA_DIR, "points.txt")
1515

1616

17-
@pytest.fixture(scope="module")
18-
def data():
17+
@pytest.fixture(scope="module", name="data")
18+
def fixture_data():
1919
"""
2020
Load the point data from the test file.
2121
"""
2222
return pd.read_table(POINTS_DATA, header=None, sep=r"\s+")
2323

2424

25-
@pytest.fixture(scope="module")
26-
def region():
25+
@pytest.fixture(scope="module", name="region")
26+
def fixture_region():
2727
"""
2828
The data region.
2929
"""

pygmt/tests/test_dimfilter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def fixture_grid():
2020

2121

2222
@pytest.fixture(scope="module", name="expected_grid")
23-
def fixture_grid_result():
23+
def fixture_expected_grid():
2424
"""
2525
Load the expected dimfilter grid result.
2626
"""

pygmt/tests/test_filter1d.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515

1616
@pytest.fixture(scope="module", name="data")
17-
def fixture_table():
17+
def fixture_data():
1818
"""
1919
Load the @MaunaLoa_CO2.txt dataset as a pandas dataframe.
2020
"""

pygmt/tests/test_grdclip.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def fixture_grid():
1919

2020

2121
@pytest.fixture(scope="module", name="expected_grid")
22-
def fixture_grid_result():
22+
def fixture_expected_grid():
2323
"""
2424
Load the expected grdclip grid result.
2525
"""

pygmt/tests/test_grdcut.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def fixture_region():
2727

2828

2929
@pytest.fixture(scope="module", name="expected_grid")
30-
def fixture_grid_result():
30+
def fixture_expected_grid():
3131
"""
3232
Load the expected grdcut grid result.
3333
"""

pygmt/tests/test_grdfill.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def fixture_grid():
2929

3030

3131
@pytest.fixture(scope="module", name="expected_grid")
32-
def fixture_grid_result():
32+
def fixture_expected_grid():
3333
"""
3434
Load the expected grdfill grid result.
3535
"""

pygmt/tests/test_grdfilter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def fixture_grid():
2121

2222

2323
@pytest.fixture(scope="module", name="expected_grid")
24-
def fixture_grid_result():
24+
def fixture_expected_grid():
2525
"""
2626
Load the expected grdfilter grid result.
2727
"""

pygmt/tests/test_grdgradient.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def fixture_grid():
2020

2121

2222
@pytest.fixture(scope="module", name="expected_grid")
23-
def fixture_grid_result():
23+
def fixture_expected_grid():
2424
"""
2525
Load the expected grdgradient grid result.
2626
"""

pygmt/tests/test_grdhisteq.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def fixture_region():
3030

3131

3232
@pytest.fixture(scope="module", name="expected_grid")
33-
def fixture_grid_result():
33+
def fixture_expected_grid():
3434
"""
3535
Load the expected grdhisteq grid result.
3636
"""
@@ -42,7 +42,7 @@ def fixture_grid_result():
4242

4343

4444
@pytest.fixture(scope="module", name="expected_df")
45-
def fixture_df_result():
45+
def fixture_expected_df():
4646
"""
4747
Load the expected grdhisteq table result.
4848
"""

0 commit comments

Comments
 (0)