mirror of
https://github.com/kennethreitz/python-guide.git
synced 2026-06-05 23:00:18 +00:00
Merge pull request #801 from tv3141/package_import_from_tests
tests: use __file__ for package import
This commit is contained in:
@@ -211,7 +211,7 @@ file:
|
|||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
sys.path.insert(0, os.path.abspath('..'))
|
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
|
||||||
|
|
||||||
import sample
|
import sample
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user