[issue18704] IDLE: PEP8 Style Check Integration

2013-09-16 Thread R. Jayakrishnan

R. Jayakrishnan added the comment:

I would prefer this issue concludes with a navigation to the new proposed 
enhancement.

--

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



[issue18704] IDLE: PEP8 Style Check Integration

2013-09-15 Thread R. Jayakrishnan

R. Jayakrishnan added the comment:

Thanks for showing great interest on this idea.
As usual, it seems this will going to be another nice project with IDLE for me. 
Better to close this issue then, and create an appropriate initiation with the 
suggested points(preferring a commencement by core developers).
 
Anyway to keep in touch with the Python analyzing and related tools, I have 
initiated a separate project with porting the works done on the patch here 
https://github.com/Jay-Krish/IDLEAnalyzer.
I Hope this will help further while working on this project.

--

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



[issue18704] IDLE: PEP8 Style Check Integration

2013-08-12 Thread R. Jayakrishnan

Changes by R. Jayakrishnan raaj...@gmail.com:


--
nosy: +philwebster

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18704
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18583] Idle: enhance FormatParagraph

2013-08-12 Thread R. Jayakrishnan

Changes by R. Jayakrishnan raaj...@gmail.com:


--
nosy: +JayKrish

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18583
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18704] IDLE: PEP8 Style Check Integration

2013-08-10 Thread R. Jayakrishnan

New submission from R. Jayakrishnan:

This is to create an IDLE extension that would integrate PEP8 (Syntax Style 
Checker https://pypi.python.org/pypi/pep8 ) into the IDLE editor window,so the 
developer who is using the IDLE editor can quickly and frequently check the 
PEP8 standards of the code which is being developed in an IDLE editor window. 
Many modern IDE's have not only syntax highlighting but on the fly syntax 
checking.

Python ensures the quality of code with its own standards implemented as PEP8. 
The tool pep8 checks Python code against some of the style conventions in PEP8. 
Also the PEP8 standardization should not be a ‘must emphasizing’ for a python 
developer, therefore configuring pep8 to enable/disable errors and warning in 
various levels should be implemented.

The implementation work is started by Todd at 
https://bitbucket.org/rovitotv/pythonpatches/src/fae1fdab936043ec35db541808f5789325762fb3/PEP8CheckExtension.patch?at=default

The submitted patch is an effort started from Todd's patch as an example. 
The IDLE with this patch will show PEP8 style check toggle menu in Options.
Once PEP8 check enabled the current module is checked by pep8 tool and the 
defects will be shown in a extended left pane. 
Defect codes will be listed as a Buttons, button click leads to highlighting 
the line and column of the defect and scroll editor window if needed. 
It is expected that the developer will correct the defect with the help of the 
message and eventually press the Resolve button,which refresh the pane.

This is an initial work and I am looking forward for suggestions on 
improvements and mistakes of this patch.

--
components: IDLE
files: PEP8Extension_1.patch
keywords: patch
messages: 194841
nosy: JayKrish
priority: normal
severity: normal
status: open
title: IDLE: PEP8 Style Check Integration
type: enhancement
versions: Python 2.7, Python 3.3, Python 3.4
Added file: http://bugs.python.org/file31221/PEP8Extension_1.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18704
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18704] IDLE: PEP8 Style Check Integration

2013-08-10 Thread R. Jayakrishnan

Changes by R. Jayakrishnan raaj...@gmail.com:


--
nosy: +Todd.Rovito

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18704
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18504] IDLE:Improvements- Improving Mock_Text

2013-07-26 Thread R. Jayakrishnan

R. Jayakrishnan added the comment:

Yes,correcting myself. I should aim indexes which actual idlelib uses. Thank 
you Terry for the grammar. Fighting with the index parsing last week, and 
finally came up with a level to break the index into base and modifier and 
decode it along with using regular expressions.
Now the mock_tk attached at this patch passes all the existing test cases, and 
failing the new test I have written on text_test

The problem now I am dealing with is, there are four exceeding conditions I 
have to handle which make errors.
1.returning line   0
2.returning line   last line
3.returning char   0 
4.returning char  its line length

For example, in parsing base the return line may exceed last line but the 
modifier will say '-2lines'  doing that, now the return line is not exceeding 
last line.

--
keywords: +patch
Added file: http://bugs.python.org/file31043/mocktk_decodeByRE1.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18504
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18504] IDLE:Improvements- Improving Mock_Text

2013-07-22 Thread R. Jayakrishnan

Changes by R. Jayakrishnan raaj...@gmail.com:


--
nosy: +Todd.Rovito

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18504
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18425] IDLE Unit test for IdleHistory.py

2013-07-21 Thread R. Jayakrishnan

Changes by R. Jayakrishnan raaj...@gmail.com:


--
resolution:  - works for me

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18425
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18504] IDLE:Improvements- Improving Mock_Text

2013-07-19 Thread R. Jayakrishnan

New submission from R. Jayakrishnan:

Following the Idle: mock Text class and test thereof created #18365
I am trying to improve the _decode function because most of the Idletests needs 
the mock text and requires some more features to handle indexes.
Started improving the mockText _decode method while writing unit test for 
AutoExpand.py at #18292. 
For now I want the mock text to decode following indexes: 
line.char, insert, end, +-#c/chars, lineend, linestart, wordstart, wordend

For this I am trying to write regular expressions to extract the parts of index.
The submitted decodeTest.py is a sample script to show how my regular 
expression starts manipulating the decoding of indexes.

I have attached a checklist of several indexes. So you can easily run them and 
get an understanding of my approach.

--
files: decodeTest.py
messages: 193358
nosy: JayKrish
priority: normal
severity: normal
status: open
title: IDLE:Improvements- Improving Mock_Text
Added file: http://bugs.python.org/file30978/decodeTest.py

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18504
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18504] IDLE:Improvements- Improving Mock_Text

2013-07-19 Thread R. Jayakrishnan

Changes by R. Jayakrishnan raaj...@gmail.com:


Added file: http://bugs.python.org/file30979/decodeChecklist.txt

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18504
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18504] IDLE:Improvements- Improving Mock_Text

2013-07-19 Thread R. Jayakrishnan

Changes by R. Jayakrishnan raaj...@gmail.com:


Removed file: http://bugs.python.org/file30978/decodeTest.py

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18504
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18504] IDLE:Improvements- Improving Mock_Text

2013-07-19 Thread R. Jayakrishnan

Changes by R. Jayakrishnan raaj...@gmail.com:


Added file: http://bugs.python.org/file30980/decodeTest.py

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18504
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18292] IDLE Improvements: Unit test for AutoExpand.py

2013-07-19 Thread R. Jayakrishnan

R. Jayakrishnan added the comment:

I am trying to improve the _decode function of mock Text class because most of 
the Idletests needs the mock text and requires some more features to handle 
indexes.
Created an issue IDLE:Improvements- Improving Mock_Text
http://bugs.python.org/issue18504

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18292
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18425] IDLE Unit test for IdleHistory.py

2013-07-18 Thread R. Jayakrishnan

R. Jayakrishnan added the comment:

Thanks Terry for we have the option of gui tests when mocking becomes too 
complicated

I put two separate classes IdleHistoryMockTest and IdleHistoryTKTest for mock 
and TK text usages and used TK Text to test IdleHistory.history_do function. 
This worked for me and hopefully IMHO the logic behind history_do is tested 
enough for now.

--
Added file: http://bugs.python.org/file30963/test_idlehistory2.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18425
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18425] IDLE Unit test for IdleHistory.py

2013-07-14 Thread R. Jayakrishnan

R. Jayakrishnan added the comment:

Now we have the mockText, So I updated my test for Idlehistory.
The submitted patch2 contains tests for two methods in Idlehistory 
(history_store and History_do).
I hope the tests for history_store are done. But the history_do method tests 
fails.
I explored a bit on the failure trace,
History_do method is called by PyShell.py
before it calls, pyShell does self.text.mark_set(iomark, insert) and passes 
the Text to IdleHistory.
Now Idlehistory uses 'iomark' as an index.
Mock Text's _decode only handles specific input indexes (as it mentions), that 
means this 'iomark' index failed to all the logic of _decode method and finally 
crosses   line, char = index.split('.') line which eventually raises a 
ValueError: need more than 1 value to unpack.

One option is to create an issue to futher develop mock Text and implement 
mark_set also the _decode and so on,
or Is it sounds like making stuffs more complex?, so we may decide the 
implemented tests are adequate enough for now.

--
Added file: http://bugs.python.org/file30912/test_idlehistory1.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18425
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18425] IDLE Unit test for IdleHistory.py

2013-07-10 Thread R. Jayakrishnan

New submission from R. Jayakrishnan:

Continuing the IDLE unittest framework #15392, unit test for IdleHistory.py. 
This test depends on mockText and uses the patch by Terry at issue #18365.
Because the mockText is still about to commit, first patch 
http://bugs.python.org/file30865/mock_text2.diff and then use 
test_idlehistory.patch to run test_idlehistory. 
Once the mock Text get committed I will improve the patch according to.

--
components: IDLE
files: test_idlehistory.patch
keywords: patch
messages: 192840
nosy: JayKrish, terry.reedy
priority: normal
severity: normal
status: open
title: IDLE Unit test for IdleHistory.py
type: enhancement
versions: Python 2.7, Python 3.3, Python 3.4
Added file: http://bugs.python.org/file30885/test_idlehistory.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18425
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17535] IDLE: Add an option to show line numbers along the left side of the editor window, and have it enabled by default.

2013-07-10 Thread R. Jayakrishnan

Changes by R. Jayakrishnan raaj...@gmail.com:


--
nosy: +JayKrish

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17535
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18365] Idle: mock Text class and test thereof

2013-07-10 Thread R. Jayakrishnan

Changes by R. Jayakrishnan raaj...@gmail.com:


--
nosy: +JayKrish

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18365
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18189] IDLE Improvements: Unit test for Delegator.py

2013-06-24 Thread R. Jayakrishnan

R. Jayakrishnan added the comment:

I wrapped requires('gui') as submitted in patch2. But this time commands 
python -m test test_idle and with -ugui does not skip delegatortest (it runs 
successfully to both).

I took Lib/test/test_tk.py as an example.
It calls runtktests.get_tests using support.run_unittest from test module.
Exploring Lib/tkinter/test/runtktests.py the get_tests method begins like



def get_tests(text=True, gui=True, packages=None):
Yield all the tests in the modules found by get_tests_modules.
If nogui is True, only tests that do not require a GUI will be
returned.
attrs = []
if text:
attrs.append('tests_nogui')
if gui:
attrs.append('tests_gui')

   
also notice the main method calles test.support.use_resources = ['gui']
Now the tktests have the line * require('gui') * before the class bigins, for 
example have a look on test_textensions.py 

So do we have to come up with the same procedure to skip and play with gui and 
non-gui tests for IDLE ? correct me if I am wrong anywhere.

--
Added file: http://bugs.python.org/file30691/test_delegator2.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18189
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18292] IDLE Improvements: Unit test for AutoExpand.py

2013-06-24 Thread R. Jayakrishnan

New submission from R. Jayakrishnan:

Continuing the IDLE unittest framework initiated in #15392. Writing test for 
AutoExpand.py

--
components: IDLE, Tests
messages: 191795
nosy: JayKrish
priority: normal
severity: normal
status: open
title: IDLE Improvements: Unit test for AutoExpand.py
type: enhancement
versions: Python 2.7, Python 3.3, Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18292
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18103] Create a GUI test framework for Idle

2013-06-17 Thread R. Jayakrishnan

Changes by R. Jayakrishnan raaj...@gmail.com:


--
nosy: +JayKrish

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18103
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18104] Idle: make human-mediated GUI tests usable

2013-06-17 Thread R. Jayakrishnan

Changes by R. Jayakrishnan raaj...@gmail.com:


--
nosy: +JayKrish

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18104
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18189] IDLE Improvements: Unit test for Delegator.py

2013-06-17 Thread R. Jayakrishnan

R. Jayakrishnan added the comment:

The from test.resource import requires give me errors saying no module named 
resource in test (Am I missing anything?)
For the moment I use from test.support import requires as in 
test_delegator1.patch
. 
from test.support import requires
requires('gui')
class Test_delegator(unittest.TestCase):

def setUp(self):
.

The results follows
---

jaykrish@jaykrish-Vostro-1520:~/gsoc/cpy/cpython$ ./python -m test -ugui 
test_idle
[1/1] test_idle
1 test OK.
[189373 refs]

--
jaykrish@jaykrish-Vostro-1520:~/gsoc/cpy/cpython$ ./python -m test test_idle
[1/1] test_idle
test test_idle failed -- Traceback (most recent call last):
  File /home/jaykrish/gsoc/cpy/cpython/Lib/unittest/case.py, line 384, in 
_executeTestPart
function()
  File /home/jaykrish/gsoc/cpy/cpython/Lib/unittest/loader.py, line 32, in 
testFailure
raise exception
ImportError: Failed to import test module: idlelib.idle_test.test_delegator
Traceback (most recent call last):
  File /home/jaykrish/gsoc/cpy/cpython/Lib/unittest/loader.py, line 261, in 
_find_tests
module = self._get_module_from_name(name)
  File /home/jaykrish/gsoc/cpy/cpython/Lib/unittest/loader.py, line 239, in 
_get_module_from_name
__import__(name)
  File 
/home/jaykrish/gsoc/cpy/cpython/Lib/idlelib/idle_test/test_delegator.py, line 
8, in module
requires('gui')
  File /home/jaykrish/gsoc/cpy/cpython/Lib/test/support.py, line 390, in 
requires
raise ResourceDenied(msg)
test.support.ResourceDenied: Use of the 'gui' resource not enabled


1 test failed:
test_idle
[189233 refs]
---


And yes, the teardown method using self.root.destroy() now.

--
Added file: http://bugs.python.org/file30626/test_delegator1.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18189
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18189] IDLE Improvements: Unit test for Delegator.py

2013-06-17 Thread R. Jayakrishnan

Changes by R. Jayakrishnan raaj...@gmail.com:


Removed file: http://bugs.python.org/file30626/test_delegator1.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18189
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18189] IDLE Improvements: Unit test for Delegator.py

2013-06-17 Thread R. Jayakrishnan

Changes by R. Jayakrishnan raaj...@gmail.com:


Added file: http://bugs.python.org/file30627/test_delegator1.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18189
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18189] IDLE Improvements: Unit test for Delegator.py

2013-06-17 Thread R. Jayakrishnan

Changes by R. Jayakrishnan raaj...@gmail.com:


--
nosy: +ncoghlan

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18189
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18189] IDLE Improvements: Unit test for Delegator.py

2013-06-11 Thread R. Jayakrishnan

New submission from R. Jayakrishnan:

Continuing the IDLE unittest framework initiated in 
http://bugs.python.org/issue15392.

A small unit test for IDLE Delegator.py module. This patch introduces a test 
module named test_delegator.py inside Lib/idlelib/idle_test, considering the 
points README file in idle_test. The test method test_setdelegate() simply 
passes a text widget to Delegator by calling setdelegate(), and test the widget 
returned by getdelegate() for the same.

--
components: IDLE
files: test_delegator.patch
keywords: patch
messages: 190960
nosy: JayKrish
priority: normal
severity: normal
status: open
title: IDLE Improvements: Unit test for Delegator.py
type: enhancement
versions: Python 3.4
Added file: http://bugs.python.org/file30544/test_delegator.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18189
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18189] IDLE Improvements: Unit test for Delegator.py

2013-06-11 Thread R. Jayakrishnan

Changes by R. Jayakrishnan raaj...@gmail.com:


--
versions: +Python 2.7, Python 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18189
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com