Skip to content

Commit 2e9d38e

Browse files
author
Boxiang Sun
committed
These tests passed now
1 parent 142a337 commit 2e9d38e

File tree

9 files changed

+15
-20
lines changed

9 files changed

+15
-20
lines changed

.travis.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,6 @@ addons:
5656
- libxml2-dev
5757
- libxslt1-dev
5858
- libssl-dev
59-
- libtk8.5
60-
- libtcl8.5
6159
- tcl8.5-dev
6260
- tk8.5-dev
6361
- swig

from_cpython/Lib/test/test_cgi.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# expected: fail
21
from test.test_support import run_unittest, check_warnings
32
import cgi
43
import os

from_cpython/Lib/test/test_richcmp.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# expected: fail
21
# Tests for rich comparisons
32

43
import unittest

from_cpython/Lib/test/test_tk.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@
77
test_support.requires('gui')
88

99
this_dir = os.path.dirname(os.path.abspath(__file__))
10-
lib_tk_test = os.path.abspath(os.path.join(this_dir, os.path.pardir,
11-
'lib-tk', 'test'))
10+
lib_tk_test = os.path.abspath(os.path.join(this_dir, '../../from_cpython/Lib', 'lib-tk', 'test'))
11+
# lib_tk_test = os.path.abspath(os.path.join(this_dir, os.path.pardir,
12+
# 'lib-tk', 'test'))
1213

1314
with test_support.DirsOnSysPath(lib_tk_test):
1415
import runtktests

from_cpython/Lib/test/test_ttk_guionly.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# expected: fail
21
import os
32
import unittest
43
from test import test_support
@@ -8,8 +7,10 @@
87
test_support.requires('gui')
98

109
this_dir = os.path.dirname(os.path.abspath(__file__))
11-
lib_tk_test = os.path.abspath(os.path.join(this_dir, os.path.pardir,
12-
'lib-tk', 'test'))
10+
# Pyston change: modify the search path
11+
lib_tk_test = os.path.abspath(os.path.join(this_dir, '../../from_cpython/Lib', 'lib-tk', 'test'))
12+
# lib_tk_test = os.path.abspath(os.path.join(this_dir, os.path.pardir,
13+
# 'lib-tk', 'test'))
1314

1415
with test_support.DirsOnSysPath(lib_tk_test):
1516
import runtktests

from_cpython/Lib/test/test_ttk_textonly.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1-
# expected: fail
21
import os
32
from test import test_support
43

54
# Skip this test if _tkinter does not exist.
65
test_support.import_module('_tkinter')
76

87
this_dir = os.path.dirname(os.path.abspath(__file__))
9-
lib_tk_test = os.path.abspath(os.path.join(this_dir, '..', 'lib-tk', 'test'))
8+
# Pyston change: modify the search path
9+
lib_tk_test = os.path.abspath(os.path.join(this_dir, '../../from_cpython/Lib', 'lib-tk', 'test'))
10+
# lib_tk_test = os.path.abspath(os.path.join(this_dir, '../../from_cpython/Lib','lib-tk', 'test))
1011

1112
with test_support.DirsOnSysPath(lib_tk_test):
1213
import runtktests

from_cpython/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ def tkinkter_ext():
174174

175175
# Hack: Just hardcode the includes dir and tcl/tk lib dir like our cffi ext.
176176
# May want something more robust later.
177-
tcl_inc = ['/usr/include/tcl']
177+
tcl_inc = ['/usr/include/tcl8.5']
178178
tcl_lib = "tcl8.5"
179179
tk_lib = "tk8.5"
180180

src/runtime/builtin_modules/thread.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -233,9 +233,9 @@ void setupThread() {
233233
FunctionMetadata::create((void*)getIdent, BOXED_INT, 0), "get_ident"));
234234
thread_module->giveAttr("stack_size", new BoxedBuiltinFunctionOrMethod(
235235
FunctionMetadata::create((void*)stackSize, BOXED_INT, 0), "stack_size"));
236-
thread_module->giveAttr("interrupt_main", new BoxedBuiltinFunctionOrMethod(
237-
FunctionMetadata::create((void*)interruptMain, UNKNOWN, 0), "interrupt_main"
238-
));
236+
thread_module->giveAttr(
237+
"interrupt_main",
238+
new BoxedBuiltinFunctionOrMethod(FunctionMetadata::create((void*)interruptMain, UNKNOWN, 0), "interrupt_main"));
239239
thread_module->giveAttr("_count", new BoxedBuiltinFunctionOrMethod(
240240
FunctionMetadata::create((void*)threadCount, BOXED_INT, 0), "_count"));
241241

test/CPYTHON_TEST_NOTES.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ test_bz2 leaks
3232
test_capi [unknown]
3333
test_cd [unknown]
3434
test_cfgparser works when run from inside the from_cpython dir
35-
test_cgi leaks
3635
test_class needs ellipsis
3736
test_cl [unknown]
3837
test_cmd_line_script [unknown]
@@ -139,7 +138,6 @@ test_pydoc [unknown]
139138
test_random long("invalid number")
140139
test_repr complex.__hash__; some unknown issues
141140
test_resource fails on travis-ci: setrlimit RLIMIT_CPU not allowed to raise maximum limit
142-
test_richcmp PyObject_Not
143141
test_runpy [unknown]
144142
test_scope eval of code object from existing function (not currently supported)
145143
test_scriptpackages [unknown]
@@ -166,14 +164,12 @@ test_tempfile [unknown]
166164
test_threading_local [unknown]
167165
test_threading [unknown]
168166
test_thread [unknown]
169-
test_tk [unknown]
167+
test_tk references leak, test files setting
170168
test_tokenize [unknown]
171169
test_tools [unknown]
172170
test_traceback [unknown]
173171
test_trace [unknown]
174172
test_transformer [unknown]
175-
test_ttk_guionly [unknown]
176-
test_ttk_textonly [unknown]
177173
test_types PyErr_WarnEx
178174
test_undocumented_details function.func_closure
179175
test_unicode argument passing issue?

0 commit comments

Comments
 (0)