Skip to content

Commit

Permalink
Merge pull request #279 from hugovk/replace-pytest-lazy-fixture
Browse files Browse the repository at this point in the history
  • Loading branch information
hugovk authored Feb 3, 2024
2 parents 098fe3b + 35d5375 commit 02385cc
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 19 deletions.
6 changes: 2 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,9 @@ dependencies = [
]
[project.optional-dependencies]
tests = [
# Temporarily pin pytest due to
# https://github.com/TvoroG/pytest-lazy-fixture/issues/65
"pytest<8",
"pytest",
"pytest-cov",
"pytest-lazy-fixture",
"pytest-lazy-fixtures",
]
[project.urls]
Changelog = "https://github.com/jazzband/prettytable/releases"
Expand Down
31 changes: 16 additions & 15 deletions tests/test_prettytable.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from typing import Any

import pytest
from pytest_lazy_fixtures import lf

import prettytable
from prettytable import (
Expand Down Expand Up @@ -224,12 +225,12 @@ class TestBuildEquivalence:
["left_hand", "right_hand"],
[
(
pytest.lazy_fixture("row_prettytable"),
pytest.lazy_fixture("col_prettytable"),
lf("row_prettytable"),
lf("col_prettytable"),
),
(
pytest.lazy_fixture("row_prettytable"),
pytest.lazy_fixture("mix_prettytable"),
lf("row_prettytable"),
lf("mix_prettytable"),
),
],
)
Expand All @@ -242,12 +243,12 @@ def test_equivalence_ascii(
["left_hand", "right_hand"],
[
(
pytest.lazy_fixture("row_prettytable"),
pytest.lazy_fixture("col_prettytable"),
lf("row_prettytable"),
lf("col_prettytable"),
),
(
pytest.lazy_fixture("row_prettytable"),
pytest.lazy_fixture("mix_prettytable"),
lf("row_prettytable"),
lf("mix_prettytable"),
),
],
)
Expand All @@ -260,12 +261,12 @@ def test_equivalence_html(
["left_hand", "right_hand"],
[
(
pytest.lazy_fixture("row_prettytable"),
pytest.lazy_fixture("col_prettytable"),
lf("row_prettytable"),
lf("col_prettytable"),
),
(
pytest.lazy_fixture("row_prettytable"),
pytest.lazy_fixture("mix_prettytable"),
lf("row_prettytable"),
lf("mix_prettytable"),
),
],
)
Expand Down Expand Up @@ -1650,7 +1651,7 @@ class TestMultiPattern:
["pt", "expected_output", "test_type"],
[
(
pytest.lazy_fixture("city_data_prettytable"),
lf("city_data_prettytable"),
"""
+-----------+------+------------+-----------------+
| City name | Area | Population | Annual Rainfall |
Expand All @@ -1667,7 +1668,7 @@ class TestMultiPattern:
"English Table",
),
(
pytest.lazy_fixture("japanese_pretty_table"),
lf("japanese_pretty_table"),
"""
+--------+------------+----------+
| Kanji | Hiragana | English |
Expand All @@ -1686,7 +1687,7 @@ class TestMultiPattern:
"Japanese table",
),
(
pytest.lazy_fixture("emoji_pretty_table"),
lf("emoji_pretty_table"),
"""
+-----------------+-----------------+
| Thunderbolt | Lightning |
Expand Down

0 comments on commit 02385cc

Please sign in to comment.