Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 105f500

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

File tree

1 file changed

+7
-2
lines changed
Filter options

1 file changed

+7
-2
lines changed

‎test/deprecation/test_attributes.py

Copy file name to clipboardExpand all lines: test/deprecation/test_attributes.py
+7-2Lines changed: 7 additions & 2 deletions
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.