Skip to content
This repository was archived by the owner on Feb 19, 2023. It is now read-only.

Commit 839d439

Browse files
committed
clean up common test
1 parent a8743b5 commit 839d439

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

tests/common_test.py

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,13 @@ def results(s):
2020
@pytest.mark.parametrize(
2121
"source",
2222
(
23+
pytest.param(
24+
"from pandas.core import common as com",
25+
id="from import, correct alias used",
26+
),
2327
pytest.param(
2428
"import pandas.core.common as com",
25-
id="non-builtin exec",
29+
id="import, correct alias used",
2630
),
2731
),
2832
)
@@ -37,13 +41,19 @@ def test_noop(source):
3741
"import pandas.core.common",
3842
"1:0: PDF009 'common' imported from 'pandas.core' without "
3943
"'com' alias",
40-
id="builtin exec",
44+
id="import, no alias",
45+
),
46+
pytest.param(
47+
"from pandas.core import common",
48+
"1:0: PDF009 'common' imported from 'pandas.core' without "
49+
"'com' alias",
50+
id="from import, no alias",
4151
),
4252
pytest.param(
4353
"from pandas.core.common import foo",
4454
"1:0: PDF009 'common' imported from 'pandas.core' without "
4555
"'com' alias",
46-
id="builtin exec",
56+
id="import from pandas.core.common",
4757
),
4858
),
4959
)

0 commit comments

Comments
 (0)