Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
5b8f2452
Commit
5b8f2452
authored
Aug 07, 2012
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix initial __path__ setting test in Py3
parent
df316fc0
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
1 deletion
+11
-1
runtests.py
runtests.py
+1
-0
tests/run/initial_file_path.srctree
tests/run/initial_file_path.srctree
+10
-1
No files found.
runtests.py
View file @
5b8f2452
...
@@ -180,6 +180,7 @@ VER_DEP_MODULES = {
...
@@ -180,6 +180,7 @@ VER_DEP_MODULES = {
'run.generator_frame_cycle', # yield in try-finally
'run.generator_frame_cycle', # yield in try-finally
'run.relativeimport_T542',
'run.relativeimport_T542',
'run.relativeimport_star_T542',
'run.relativeimport_star_T542',
'run.initial_file_path', # relative import
]),
]),
(2,6) : (operator.lt, lambda x: x in ['run.print_function',
(2,6) : (operator.lt, lambda x: x in ['run.print_function',
'run.cython3',
'run.cython3',
...
...
tests/run/initial_file_path.srctree
View file @
5b8f2452
...
@@ -17,11 +17,20 @@ setup(
...
@@ -17,11 +17,20 @@ setup(
initial_path = __path__
initial_path = __path__
initial_file = __file__
initial_file = __file__
import a
try:
from . import a
import_error = None
except ImportError as e:
import_error = e
import traceback
traceback.print_exc()
def test():
def test():
print "FILE: ", initial_file
print "PATH: ", initial_path
assert initial_path[0].endswith('my_test_package'), initial_path
assert initial_path[0].endswith('my_test_package'), initial_path
assert initial_file.endswith('__init__.py'), initial_file
assert initial_file.endswith('__init__.py'), initial_file
assert import_error is None, import_error
######## my_test_package/a.py ########
######## my_test_package/a.py ########
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment