Show More
@@ -29,6 +29,10 b' jobs:' | |||||
29 | - os: ubuntu-latest |
|
29 | - os: ubuntu-latest | |
30 | python-version: "3.10" |
|
30 | python-version: "3.10" | |
31 | deps: test |
|
31 | deps: test | |
|
32 | # Tests latest development Python version | |||
|
33 | - os: ubuntu-latest | |||
|
34 | python-version: "3.11-dev" | |||
|
35 | deps: test | |||
32 |
|
36 | |||
33 | steps: |
|
37 | steps: | |
34 | - uses: actions/checkout@v2 |
|
38 | - uses: actions/checkout@v2 |
@@ -104,7 +104,7 b' def test_unicode_range():' | |||||
104 | assert len_exp == len_test, message |
|
104 | assert len_exp == len_test, message | |
105 |
|
105 | |||
106 | # fail if new unicode symbols have been added. |
|
106 | # fail if new unicode symbols have been added. | |
107 |
assert len_exp <= 13 |
|
107 | assert len_exp <= 138552, message | |
108 |
|
108 | |||
109 |
|
109 | |||
110 | @contextmanager |
|
110 | @contextmanager | |
@@ -219,6 +219,11 b' class KeyCompletable:' | |||||
219 | return list(self.things) |
|
219 | return list(self.things) | |
220 |
|
220 | |||
221 |
|
221 | |||
|
222 | @pytest.mark.xfail( | |||
|
223 | sys.version_info >= (3, 11), | |||
|
224 | reason="parso does not support 3.11 yet", | |||
|
225 | raises=NotImplementedError, | |||
|
226 | ) | |||
222 | class TestCompleter(unittest.TestCase): |
|
227 | class TestCompleter(unittest.TestCase): | |
223 | def setUp(self): |
|
228 | def setUp(self): | |
224 | """ |
|
229 | """ | |
@@ -282,7 +287,7 b' class TestCompleter(unittest.TestCase):' | |||||
282 |
|
287 | |||
283 | ip = get_ipython() |
|
288 | ip = get_ipython() | |
284 | # Test some random unicode symbols |
|
289 | # Test some random unicode symbols | |
285 |
keys = random.sample(latex_symbols |
|
290 | keys = random.sample(sorted(latex_symbols), 10) | |
286 | for k in keys: |
|
291 | for k in keys: | |
287 | text, matches = ip.complete(k) |
|
292 | text, matches = ip.complete(k) | |
288 | self.assertEqual(text, k) |
|
293 | self.assertEqual(text, k) |
@@ -6,13 +6,13 b'' | |||||
6 | # Distributed under the terms of the Modified BSD License. |
|
6 | # Distributed under the terms of the Modified BSD License. | |
7 |
|
7 | |||
8 | import unittest |
|
8 | import unittest | |
|
9 | import pytest | |||
9 | import sys |
|
10 | import sys | |
10 |
|
11 | |||
11 | from IPython.core import inputsplitter as isp |
|
12 | from IPython.core import inputsplitter as isp | |
12 | from IPython.core.inputtransformer import InputTransformer |
|
13 | from IPython.core.inputtransformer import InputTransformer | |
13 | from IPython.core.tests.test_inputtransformer import syntax, syntax_ml |
|
14 | from IPython.core.tests.test_inputtransformer import syntax, syntax_ml | |
14 | from IPython.testing import tools as tt |
|
15 | from IPython.testing import tools as tt | |
15 | from IPython.testing.decorators import skipif |
|
|||
16 |
|
16 | |||
17 | #----------------------------------------------------------------------------- |
|
17 | #----------------------------------------------------------------------------- | |
18 | # Semi-complete examples (also used as tests) |
|
18 | # Semi-complete examples (also used as tests) | |
@@ -318,7 +318,12 b' class InputSplitterTestCase(unittest.TestCase):' | |||||
318 | self.isp.push(u'\xc3\xa9') |
|
318 | self.isp.push(u'\xc3\xa9') | |
319 | self.isp.push(u"u'\xc3\xa9'") |
|
319 | self.isp.push(u"u'\xc3\xa9'") | |
320 |
|
320 | |||
321 | @skipif(sys.version_info[:3] == (3, 9, 8)) |
|
321 | @pytest.mark.xfail( | |
|
322 | reason="Bug in python 3.9.8 – bpo 45738", | |||
|
323 | condition=sys.version_info in [(3, 9, 8, "final", 0), (3, 11, 0, "alpha", 2)], | |||
|
324 | raises=SystemError, | |||
|
325 | strict=True, | |||
|
326 | ) | |||
322 | def test_line_continuation(self): |
|
327 | def test_line_continuation(self): | |
323 | """ Test issue #2108.""" |
|
328 | """ Test issue #2108.""" | |
324 | isp = self.isp |
|
329 | isp = self.isp |
@@ -276,7 +276,8 b' examples = [' | |||||
276 | None, |
|
276 | None, | |
277 | marks=pytest.mark.xfail( |
|
277 | marks=pytest.mark.xfail( | |
278 | reason="Bug in python 3.9.8 – bpo 45738", |
|
278 | reason="Bug in python 3.9.8 – bpo 45738", | |
279 |
condition=sys.version_info |
|
279 | condition=sys.version_info | |
|
280 | in [(3, 9, 8, "final", 0), (3, 11, 0, "alpha", 2)], | |||
280 | raises=SystemError, |
|
281 | raises=SystemError, | |
281 | strict=True, |
|
282 | strict=True, | |
282 | ), |
|
283 | ), | |
@@ -295,7 +296,9 b' def test_check_complete_param(code, expected, number):' | |||||
295 | @skip_iptest_but_not_pytest |
|
296 | @skip_iptest_but_not_pytest | |
296 | @pytest.mark.xfail( |
|
297 | @pytest.mark.xfail( | |
297 | reason="Bug in python 3.9.8 – bpo 45738", |
|
298 | reason="Bug in python 3.9.8 – bpo 45738", | |
298 |
condition=sys.version_info[ |
|
299 | condition=sys.version_info in [(3, 9, 8, "final", 0), (3, 11, 0, "alpha", 2)], | |
|
300 | raises=SystemError, | |||
|
301 | strict=True, | |||
299 | ) |
|
302 | ) | |
300 | def test_check_complete(): |
|
303 | def test_check_complete(): | |
301 | cc = ipt2.TransformerManager().check_complete |
|
304 | cc = ipt2.TransformerManager().check_complete |
@@ -269,7 +269,6 b' def test_empty_property_has_no_source():' | |||||
269 |
|
269 | |||
270 |
|
270 | |||
271 | def test_property_sources(): |
|
271 | def test_property_sources(): | |
272 | import posixpath |
|
|||
273 | # A simple adder whose source and signature stays |
|
272 | # A simple adder whose source and signature stays | |
274 | # the same across Python distributions |
|
273 | # the same across Python distributions | |
275 | def simple_add(a, b): |
|
274 | def simple_add(a, b): | |
@@ -283,7 +282,7 b' def test_property_sources():' | |||||
283 |
|
282 | |||
284 | foo = foo.setter(lambda self, v: setattr(self, 'bar', v)) |
|
283 | foo = foo.setter(lambda self, v: setattr(self, 'bar', v)) | |
285 |
|
284 | |||
286 |
dname = property( |
|
285 | dname = property(oinspect.getdoc) | |
287 | adder = property(simple_add) |
|
286 | adder = property(simple_add) | |
288 |
|
287 | |||
289 | i = inspector.info(A.foo, detail_level=1) |
|
288 | i = inspector.info(A.foo, detail_level=1) | |
@@ -291,7 +290,7 b' def test_property_sources():' | |||||
291 | assert "lambda self, v:" in i["source"] |
|
290 | assert "lambda self, v:" in i["source"] | |
292 |
|
291 | |||
293 | i = inspector.info(A.dname, detail_level=1) |
|
292 | i = inspector.info(A.dname, detail_level=1) | |
294 |
assert "def |
|
293 | assert "def getdoc(obj)" in i["source"] | |
295 |
|
294 | |||
296 | i = inspector.info(A.adder, detail_level=1) |
|
295 | i = inspector.info(A.adder, detail_level=1) | |
297 | assert "def simple_add(a, b)" in i["source"] |
|
296 | assert "def simple_add(a, b)" in i["source"] |
General Comments 0
You need to be logged in to leave comments.
Login now