Skip to content

Commit

Permalink
Test
Browse files Browse the repository at this point in the history
  • Loading branch information
Boxiang Sun committed Jul 19, 2016
1 parent d2293a8 commit be94efc
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 17 deletions.
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,6 @@ addons:
- libxml2-dev
- libxslt1-dev
- libssl-dev
- libtk8.5
- libtcl8.5
- tcl8.5-dev
- tk8.5-dev
- swig
Expand All @@ -79,6 +77,9 @@ install:

before_script:
- mysql -e 'create database mysqldb_test charset utf8;'
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- sleep 3 # give xvfb some time to start

script:
- ccache -z
Expand Down
1 change: 0 additions & 1 deletion from_cpython/Lib/test/test_cgi.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# expected: fail
from test.test_support import run_unittest, check_warnings
import cgi
import os
Expand Down
1 change: 0 additions & 1 deletion from_cpython/Lib/test/test_richcmp.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# expected: fail
# Tests for rich comparisons

import unittest
Expand Down
5 changes: 3 additions & 2 deletions from_cpython/Lib/test/test_tk.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@
test_support.requires('gui')

this_dir = os.path.dirname(os.path.abspath(__file__))
lib_tk_test = os.path.abspath(os.path.join(this_dir, os.path.pardir,
'lib-tk', 'test'))
lib_tk_test = os.path.abspath(os.path.join(this_dir, '../../from_cpython/Lib', 'lib-tk', 'test'))
# lib_tk_test = os.path.abspath(os.path.join(this_dir, os.path.pardir,
# 'lib-tk', 'test'))

with test_support.DirsOnSysPath(lib_tk_test):
import runtktests
Expand Down
10 changes: 7 additions & 3 deletions from_cpython/Lib/test/test_ttk_guionly.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# expected: fail
# skip-if: True
# Can passed in local machine, but failed on travis CI with _tkinter.TclError: out of stack space,
# threading issue?
import os
import unittest
from test import test_support
Expand All @@ -8,8 +10,10 @@
test_support.requires('gui')

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

with test_support.DirsOnSysPath(lib_tk_test):
import runtktests
Expand Down
5 changes: 3 additions & 2 deletions from_cpython/Lib/test/test_ttk_textonly.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
# expected: fail
import os
from test import test_support

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

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

with test_support.DirsOnSysPath(lib_tk_test):
import runtktests
Expand Down
2 changes: 1 addition & 1 deletion from_cpython/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ def tkinkter_ext():

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

Expand Down
7 changes: 2 additions & 5 deletions test/CPYTHON_TEST_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ test_bz2 leaks
test_capi [unknown]
test_cd [unknown]
test_cfgparser works when run from inside the from_cpython dir
test_cgi leaks
test_class needs ellipsis
test_cl [unknown]
test_cmd_line_script [unknown]
Expand Down Expand Up @@ -139,7 +138,6 @@ test_pydoc [unknown]
test_random long("invalid number")
test_repr complex.__hash__; some unknown issues
test_resource fails on travis-ci: setrlimit RLIMIT_CPU not allowed to raise maximum limit
test_richcmp PyObject_Not
test_runpy [unknown]
test_scope eval of code object from existing function (not currently supported)
test_scriptpackages [unknown]
Expand All @@ -166,14 +164,13 @@ test_tempfile [unknown]
test_threading_local [unknown]
test_threading [unknown]
test_thread [unknown]
test_tk [unknown]
test_tk references leak, test files setting
test_tokenize [unknown]
test_tools [unknown]
test_traceback [unknown]
test_trace [unknown]
test_transformer [unknown]
test_ttk_guionly [unknown]
test_ttk_textonly [unknown]
test_ttk_guionly Can not pass it in CI. Passed in local machine.
test_types PyErr_WarnEx
test_undocumented_details function.func_closure
test_unicode argument passing issue?
Expand Down

0 comments on commit be94efc

Please sign in to comment.