[issue23205] Unit test needed for IDLE's GrepDialog.py's findfiles()

2019-03-23 Thread Cheryl Sabella
Cheryl Sabella added the comment: On linux, grep does depth first, so searching for 'idle' from Lib.idlelib returns: --- cut --- help.py history.py idle.py all of idle_test/ __init__.py iomenu.py --- cut --- Although, within idle_test, the files aren't in alphabetical order. Also, as you c

[issue23205] Unit test needed for IDLE's GrepDialog.py's findfiles()

2019-03-23 Thread Cheryl Sabella
Change by Cheryl Sabella : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ __

[issue23205] Unit test needed for IDLE's GrepDialog.py's findfiles()

2019-03-23 Thread miss-islington
miss-islington added the comment: New changeset 5ab665005b7f8a21c133208f140389e3bb1a3294 by Miss Islington (bot) in branch '3.7': bpo-23205: IDLE: Add tests and refactor grep's findfiles (GH-12203) https://github.com/python/cpython/commit/5ab665005b7f8a21c133208f140389e3bb1a3294 --

[issue23205] Unit test needed for IDLE's GrepDialog.py's findfiles()

2019-03-23 Thread miss-islington
Change by miss-islington : -- pull_requests: +12463 stage: needs patch -> patch review ___ Python tracker ___ ___ Python-bugs-list m

[issue23205] Unit test needed for IDLE's GrepDialog.py's findfiles()

2019-03-23 Thread Cheryl Sabella
Cheryl Sabella added the comment: New changeset d60f658fc0278f3fcdadec8ddcab35b8ae03e1d1 by Cheryl Sabella in branch 'master': bpo-23205: IDLE: Add tests and refactor grep's findfiles (GH-12203) https://github.com/python/cpython/commit/d60f658fc0278f3fcdadec8ddcab35b8ae03e1d1 -- __

[issue23205] Unit test needed for IDLE's GrepDialog.py's findfiles()

2019-03-23 Thread Terry J. Reedy
Terry J. Reedy added the comment: Commit as-is. I will consider the Path.glob findfiles while working on #36323. Like walk, it yields in breadth first order. Unlike walk, it requires relative paths (which #37323 may need anyway) and needs code to deal with that. I like the breadth first l

[issue23205] Unit test needed for IDLE's GrepDialog.py's findfiles()

2019-03-06 Thread Cheryl Sabella
Cheryl Sabella added the comment: I've opened a PR with the changes. I did several commits, one for each stage. That is, the first one adds the test, then the second one moves `findfiles` to the module level, etc. I added the `onerror` function because if a directory that doesn't exist is

[issue23205] Unit test needed for IDLE's GrepDialog.py's findfiles()

2019-03-06 Thread Cheryl Sabella
Change by Cheryl Sabella : -- pull_requests: +12198 stage: needs patch -> patch review ___ Python tracker ___ ___ Python-bugs-list m

[issue23205] Unit test needed for IDLE's GrepDialog.py's findfiles()

2019-02-24 Thread Cheryl Sabella
Cheryl Sabella added the comment: Sure, thanks. grep was on list to add tests to, so I'll take a look at this as well. Thanks! -- assignee: -> cheryl.sabella ___ Python tracker __

[issue23205] Unit test needed for IDLE's GrepDialog.py's findfiles()

2019-02-23 Thread Terry J. Reedy
Terry J. Reedy added the comment: Findfiles was more like os.walk than os.listdir. os.walk now uses os.scandir instead of os.listdir. From 3.7.2 doc: "By default, errors from the scandir() call are ignored. If optional argument onerror is specified, it should be a function; it will be call

[issue23205] Unit test needed for IDLE's GrepDialog.py's findfiles()

2015-01-10 Thread Al Sweigart
Al Sweigart added the comment: I checked with a couple grep programs and they use depth first. Which makes sense, since you'd want the return order to be something like: /a/spam.txt /a/aa/spam.txt /a/bb/spam.txt /x/spam.txt /y/spam.txt /z/spam.txt ...instead of the bread-first: /a/spam.txt /x

[issue23205] Unit test needed for IDLE's GrepDialog.py's findfiles()

2015-01-10 Thread Terry J. Reedy
Terry J. Reedy added the comment: I have been putting off re-writing findfiles because it partly duplicates os.listdir, which should perhaps be used instead, except that a new, improved, os.scandir is in the works: PEP 471 and #22524. I believe filefiles currently searches depth first, wherea

[issue23205] Unit test needed for IDLE's GrepDialog.py's findfiles()

2015-01-09 Thread Al Sweigart
New submission from Al Sweigart: GrepDialog.py's findfiles() method lacks a unit test. The comments in the unit test stub in test_grep.py correctly notes that since findfiles() method does not rely on the GrepDialog class, it can be made into a function. The attached patch does the following: