[issue35730] IDLE: Fix squeezer test_reload.

2019-01-17 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

I looked at the non-green results on the buildbot grid and found one IDLE 
failure, which passed on retest.  I opened #35771 for this.

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35730] IDLE: Fix squeezer test_reload.

2019-01-17 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
pull_requests:  -11322

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35730] IDLE: Fix squeezer test_reload.

2019-01-17 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
pull_requests:  -11321

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35730] IDLE: Fix squeezer test_reload.

2019-01-17 Thread miss-islington


miss-islington  added the comment:


New changeset 237f864c905531b2da211bebc5f6109b0b797bac by Miss Islington (bot) 
in branch '3.7':
bpo-35730: IDLE - test squeezer reload() by checking load_font() (GH-11585)
https://github.com/python/cpython/commit/237f864c905531b2da211bebc5f6109b0b797bac


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35730] IDLE: Fix squeezer test_reload.

2019-01-17 Thread miss-islington


Change by miss-islington :


--
pull_requests: +11320

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35730] IDLE: Fix squeezer test_reload.

2019-01-17 Thread miss-islington


Change by miss-islington :


--
pull_requests: +11320, 11321, 11322

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35730] IDLE: Fix squeezer test_reload.

2019-01-17 Thread Terry J. Reedy


Terry J. Reedy  added the comment:


New changeset e55cf024cae203f63b4f78f1b21c1375fe424441 by Terry Jan Reedy (Tal 
Einat) in branch 'master':
bpo-35730: IDLE - test squeezer reload() by checking load_font() (GH-11585)
https://github.com/python/cpython/commit/e55cf024cae203f63b4f78f1b21c1375fe424441


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35730] IDLE: Fix squeezer test_reload.

2019-01-17 Thread miss-islington


Change by miss-islington :


--
pull_requests: +11320, 11321

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35730] IDLE: Fix squeezer test_reload.

2019-01-17 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
pull_requests:  -11273

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35730] IDLE: Fix squeezer test_reload.

2019-01-17 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
pull_requests:  -11274

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35730] IDLE: Fix squeezer test_reload.

2019-01-16 Thread Tal Einat


Change by Tal Einat :


--
pull_requests: +11272, 11273, 11274

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35730] IDLE: Fix squeezer test_reload.

2019-01-16 Thread Tal Einat


Change by Tal Einat :


--
pull_requests: +11272, 11273

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35730] IDLE: Fix squeezer test_reload.

2019-01-16 Thread Tal Einat


Change by Tal Einat :


--
pull_requests: +11272

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35730] IDLE: Fix squeezer test_reload.

2019-01-15 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
pull_requests:  -11182

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35730] IDLE: Fix squeezer test_reload.

2019-01-15 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
pull_requests:  -11183

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35730] IDLE: Fix squeezer test_reload.

2019-01-14 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
pull_requests: +11181, 11182

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35730] IDLE: Fix squeezer test_reload.

2019-01-14 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
pull_requests: +11181

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35730] IDLE: Fix squeezer test_reload.

2019-01-14 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
pull_requests: +11181, 11182, 11183

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35730] IDLE: Fix squeezer test_reload.

2019-01-14 Thread STINNER Victor


STINNER Victor  added the comment:

The test still pass on my Fedora 29 with:

diff --git a/Lib/idlelib/idle_test/test_squeezer.py 
b/Lib/idlelib/idle_test/test_squeezer.py
index 71eccd3693..e026567789 100644
--- a/Lib/idlelib/idle_test/test_squeezer.py
+++ b/Lib/idlelib/idle_test/test_squeezer.py
@@ -114,7 +114,7 @@ class SqueezerTest(unittest.TestCase):
 if root is None:
 root = get_test_tk_root(self)
 text_widget = Text(root)
-text_widget["font"] = ('Courier', 10)
+text_widget["font"] = ('', 10)
 text_widget.mark_set("iomark", "1.0")
 return text_widget
 
@@ -300,7 +300,7 @@ class SqueezerTest(unittest.TestCase):
 orig_auto_squeeze_min_lines = squeezer.auto_squeeze_min_lines
 
 # Increase both font size and auto-squeeze-min-lines.
-text_widget["font"] = ('Courier', 20)
+text_widget["font"] = ('', 20)
 new_auto_squeeze_min_lines = orig_auto_squeeze_min_lines + 10
 self.set_idleconf_option_with_cleanup(
 'main', 'PyShell', 'auto-squeeze-min-lines',
@@ -309,7 +309,7 @@ class SqueezerTest(unittest.TestCase):
 Squeezer.reload()
 # The following failed on Gentoo buildbots.  Issue title will be
 # IDLE: Fix squeezer test_reload.
-#self.assertGreater(squeezer.zero_char_width, orig_zero_char_width)
+self.assertGreater(squeezer.zero_char_width, orig_zero_char_width)
 self.assertEqual(squeezer.auto_squeeze_min_lines,
  new_auto_squeeze_min_lines)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35730] IDLE: Fix squeezer test_reload.

2019-01-14 Thread Tal Einat


Tal Einat  added the comment:

> What if the old and the new font have the same width?

The font is set to Courier 10 in the test's setup, and it is then set to 
Courier 20 by the test before calling reload(). The zero character should 
certainly not have the same width in both cases.

ISTM that indeed the font must be missing, or something of that sort.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35730] IDLE: Fix squeezer test_reload.

2019-01-14 Thread STINNER Victor


STINNER Victor  added the comment:

> Not really. This test, test_reload(), is specifically checking that the 
> reload() function updates zero_char_width after font changes.

What if the old and the new font have the same width?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35730] IDLE: Fix squeezer test_reload.

2019-01-14 Thread Tal Einat


Tal Einat  added the comment:

> The test rely on a specific font name and specific font size: maybe this 
> specific font is not available.

Can you help by checking this? Is there another font known to be universally 
available?

> Instead of skipping the test, would it make same to accept that 
> squeezer.zero_char_width does not change? I don't know IDLE nor the test.

Not really. This test, test_reload(), is specifically checking that the 
reload() function updates zero_char_width after font changes.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35730] IDLE: Fix squeezer test_reload.

2019-01-14 Thread STINNER Victor


STINNER Victor  added the comment:

https://buildbot.python.org/all/#/builders/108/builds/895/steps/5/logs/stdio
https://buildbot.python.org/all/#/builders/115/builds/888/steps/4/logs/stdio

==
FAIL: test_reload (idlelib.idle_test.test_squeezer.SqueezerTest)
Test the reload() class-method.
--
Traceback (most recent call last):
  File 
"/buildbot/buildarea/cpython/3.7.ware-gentoo-x86.installed/build/target/lib/python3.7/idlelib/idle_test/test_squeezer.py",
 line 310, in test_reload
self.assertGreater(squeezer.zero_char_width, orig_zero_char_width)
AssertionError: 6 not greater than 6


> Two debug prints that might help: the tk patch level (does Gentoo have 
> something ancient?); the actual font and in particular the actual size 
> resulting from ('Courier', 10/20).

The pythoninfo step of the buildbot says:

tkinter.TCL_VERSION: 8.6
tkinter.TK_VERSION: 8.6
tkinter.info_patchlevel: 8.6.8

--

The test pass (at revision 47bd7770229b5238a438703ee1d52da2e983ec9e, before you 
disabled the test) on my Fedora 29. I enabled all test resources using "-u 
all". I have the same Tkinter version:

$ ./python -m test -u all test_idle -m test_reload -v
== CPython 3.7.2+ (tags/v3.7.2-112-g47bd777022:47bd777022, Jan 14 2019, 
10:12:33) [GCC 8.2.1 20181215 (Red Hat 8.2.1-6)]
== Linux-4.19.13-300.fc29.x86_64-x86_64-with-fedora-29-Twenty_Nine little-endian
== cwd: /home/vstinner/prog/python/master/build/test_python_3006
== CPU count: 8
== encodings: locale=UTF-8, FS=utf-8
Run tests sequentially
0:00:00 load avg: 1.23 [1/1] test_idle
test_reload (idlelib.idle_test.test_codecontext.CodeContextTest) ... ok
test_reload (idlelib.idle_test.test_squeezer.SqueezerTest)
Test the reload() class-method. ... ok

--

Ran 2 tests in 0.069s

OK

== Tests result: SUCCESS ==

1 test OK.

Total duration: 1 sec 344 ms
Tests result: SUCCESS

vstinner@apu$ make pythoninfo|grep ^tk
tkinter.TCL_VERSION: 8.6
tkinter.TK_VERSION: 8.6
tkinter.info_patchlevel: 8.6.8

--

The test rely on a specific font name and specific font size: maybe this 
specific font is not available. Instead of skipping the test, would it make 
same to accept that squeezer.zero_char_width does not change? I don't know IDLE 
nor the test.

diff --git a/Lib/idlelib/idle_test/test_squeezer.py 
b/Lib/idlelib/idle_test/test_squeezer.py
index 7c28a107a9..0d4467af0a 100644
--- a/Lib/idlelib/idle_test/test_squeezer.py
+++ b/Lib/idlelib/idle_test/test_squeezer.py
@@ -307,7 +307,7 @@ class SqueezerTest(unittest.TestCase):
 str(new_auto_squeeze_min_lines))
 
 Squeezer.reload()
-self.assertGreater(squeezer.zero_char_width, orig_zero_char_width)
+self.assertGreaterEqual(squeezer.zero_char_width, orig_zero_char_width)
 self.assertEqual(squeezer.auto_squeeze_min_lines,
  new_auto_squeeze_min_lines)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35730] IDLE: Fix squeezer test_reload.

2019-01-13 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

The corresponding 3.7 buildbots failed the same way, 6 not greater than 6, as 
the 3.8 buildbots.
https://buildbot.python.org/all/#/builders/108/builds/895/steps/5/logs/stdio
https://buildbot.python.org/all/#/builders/115/builds/888/steps/4/logs/stdio

One reason I am suspicious that something weird is going on is the width of 6.  
On my system, the Courier 10 and Courier 20 0 widths are 10 and 20.  The Times 
New Roman 0 width, on CI machines that failed, was 8 (to be doubled to 16).  6 
seems too small for Courier 10 0.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35730] IDLE: Fix squeezer test_reload.

2019-01-13 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

I just realized that the Gentoo bots where this failed are, last I knew, the 
only *nix bots with X installed.  The non-Windows CI bots run the gui tests 
with an X simulator.  So Gentoo might not be the only distribution where this 
would fail.


Two debug prints that might help: the tk patch level (does Gentoo have 
something ancient?); the actual font and in particular the actual size 
resulting from ('Courier', 10/20).

--
nosy: +cheryl.sabella

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35730] IDLE: Fix squeezer test_reload.

2019-01-13 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
pull_requests:  -11157

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35730] IDLE: Fix squeezer test_reload.

2019-01-13 Thread miss-islington


miss-islington  added the comment:


New changeset 890d3fa10c68af6306cf6b989b2133978e6e7a12 by Miss Islington (bot) 
in branch '3.7':
bpo-35730: Disable IDLE test_reload assertion. (GH-11543)
https://github.com/python/cpython/commit/890d3fa10c68af6306cf6b989b2133978e6e7a12


--
nosy: +miss-islington

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35730] IDLE: Fix squeezer test_reload.

2019-01-13 Thread miss-islington


Change by miss-islington :


--
pull_requests: +11156

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35730] IDLE: Fix squeezer test_reload.

2019-01-13 Thread miss-islington


Change by miss-islington :


--
pull_requests: +11156, 11157

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35730] IDLE: Fix squeezer test_reload.

2019-01-13 Thread Terry J. Reedy


Terry J. Reedy  added the comment:


New changeset 5bb146aaea1484bcc117ab6cb38dda39ceb5df0f by Terry Jan Reedy in 
branch 'master':
bpo-35730: Disable IDLE test_reload assertion. (GH-11543)
https://github.com/python/cpython/commit/5bb146aaea1484bcc117ab6cb38dda39ceb5df0f


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35730] IDLE: Fix squeezer test_reload.

2019-01-13 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Victor, a particular test assert fails only on Gentoo bots (see above).  
Questions:

1. Can we disable the assert only on those machines?

2. I sometimes see what look like debug prints in buildbot test logs.  Correct? 
 If so, stdout or stderr?

--
nosy: +vstinner

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35730] IDLE: Fix squeezer test_reload.

2019-01-13 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
pull_requests:  -11155

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35730] IDLE: Fix squeezer test_reload.

2019-01-13 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
pull_requests:  -11154

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35730] IDLE: Fix squeezer test_reload.

2019-01-13 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
keywords: +patch
pull_requests: +11153
stage: needs patch -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35730] IDLE: Fix squeezer test_reload.

2019-01-13 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
keywords: +patch, patch, patch
pull_requests: +11153, 11154, 11155
stage: needs patch -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35730] IDLE: Fix squeezer test_reload.

2019-01-13 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
keywords: +patch, patch
pull_requests: +11153, 11154
stage: needs patch -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35730] IDLE: Fix squeezer test_reload.

2019-01-13 Thread Terry J. Reedy


New submission from Terry J. Reedy :

PR 10454 for #35196 added, among other things, more tests to test_squeezer.py.  
SqueezerTest.test_reload initially worked on Mac and personal Windows machines. 
It failed on Cheryl Sabella's personal Ubuntu machine because doubling the 
nominal font size did not necessarily exactly double the reported pixel size of 
'0'.  This was easily fixed by testing only that the size increased.

self.assertGreater(squeezer.zero_char_width, orig_zero_char_width)

It failed on CI Linux and Windows machines because the pixel size did not 
increase at all. This was fixed for the CI machines by directly assigning a new 
font tuple to text['font'] instead of involving the idleConf machinery.  
However, after merging, it failed with the same error that previously occurred 
on the CI machines.

AssertionError: 6 not greater than 6.

The initial fix will be to disable the assertion.

--
assignee: terry.reedy
components: IDLE
messages: 333558
nosy: taleinat, terry.reedy
priority: normal
severity: normal
stage: needs patch
status: open
title: IDLE: Fix squeezer test_reload.
type: behavior
versions: Python 3.7, Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com