Skip to content

Commit 105f500

Browse files
committed
Test attribute access and importing separately
Rather than only testing attribute access.
1 parent b7a3d8c commit 105f500

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

test/deprecation/test_attributes.py

+7-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,14 @@
22

33
import pytest
44

5-
import git
65

6+
def test_cannot_get_undefined() -> None:
7+
import git
78

8-
def test_no_attribute() -> None:
99
with pytest.raises(AttributeError):
1010
git.foo
11+
12+
13+
def test_cannot_import_undefined() -> None:
14+
with pytest.raises(ImportError):
15+
from git import foo

0 commit comments

Comments
 (0)