Re: testing code

2018-07-08 Thread Sharan Basappa
On Sunday, 8 July 2018 12:42:07 UTC+5:30, Christian Gollwitzer wrote: > Am 08.07.18 um 06:21 schrieb Sharan Basappa: > > sorry. there was a copy paste error when i posted. I pasted test_2.py for > > both the files: > > > > here are the files again. The issue remains. > > > output: > > %run

Re: testing code

2018-07-08 Thread Christian Gollwitzer
Am 08.07.18 um 06:21 schrieb Sharan Basappa: sorry. there was a copy paste error when i posted. I pasted test_2.py for both the files: here are the files again. The issue remains. output: %run "D:/Projects/Initiatives/machine learning/programs/test_2_test.py" 30 Jim spotted it... '%run'

Re: testing code

2018-07-08 Thread Sharan Basappa
On Sunday, 8 July 2018 11:52:39 UTC+5:30, Jim Lee wrote: > On 07/07/18 21:21, Sharan Basappa wrote: > > > > sorry. there was a copy paste error when i posted. I pasted test_2.py for > > both the files: > > > > here are the files again. The issue remains. > > [...] > > > > output: > > %run

Re: testing code

2018-07-08 Thread Jim Lee
On 07/07/18 21:21, Sharan Basappa wrote: sorry. there was a copy paste error when i posted. I pasted test_2.py for both the files: here are the files again. The issue remains. [...] output: %run "D:/Projects/Initiatives/machine learning/programs/test_2_test.py" 30 [11:24 PM jlee@kerndev

Re: testing code

2018-07-07 Thread Sharan Basappa
On Saturday, 7 July 2018 18:22:23 UTC+5:30, Chris Angelico wrote: > On Sat, Jul 7, 2018 at 10:02 PM, Sharan Basappa > wrote: > > On Friday, 6 July 2018 09:22:31 UTC+5:30, Chris Angelico wrote: > >> On Fri, Jul 6, 2018 at 12:56 PM, Sharan Basappa > >> wrote: > >> > Please let me know if the

Re: testing code

2018-07-07 Thread Chris Angelico
On Sat, Jul 7, 2018 at 10:02 PM, Sharan Basappa wrote: > On Friday, 6 July 2018 09:22:31 UTC+5:30, Chris Angelico wrote: >> On Fri, Jul 6, 2018 at 12:56 PM, Sharan Basappa >> wrote: >> > Please let me know if the following understanding of mine is correct. >> > I need to put the program code in

Re: testing code

2018-07-07 Thread Sharan Basappa
On Friday, 6 July 2018 09:22:31 UTC+5:30, Chris Angelico wrote: > On Fri, Jul 6, 2018 at 12:56 PM, Sharan Basappa > wrote: > > Please let me know if the following understanding of mine is correct. > > I need to put the program code in a separate file and organize every > > executable code in

Re: testing code

2018-07-06 Thread Sharan Basappa
On Friday, 6 July 2018 09:22:31 UTC+5:30, Chris Angelico wrote: > On Fri, Jul 6, 2018 at 12:56 PM, Sharan Basappa > wrote: > > Please let me know if the following understanding of mine is correct. > > I need to put the program code in a separate file and organize every > > executable code in

Re: testing code

2018-07-06 Thread Sharan Basappa
common, almost universal, requirement and there > is > a standard idom for arranging it. > > Support you have your code in the file "foo.py" (because I need a concrete > filename for the example). It might look like this at present: > > def func1(...): > >

Re: testing code

2018-07-05 Thread Cameron Simpson
func2(...): x = func1(...) y = func2(...) print(x + y) i.e. some function definitions and then you testing code. Now, you can write another file "foo_tests.py" which starts like this: import foo ... run some tests of foo.func1, foo.func2 etc ... The issue is that as written,

Re: testing code

2018-07-05 Thread Chris Angelico
On Fri, Jul 6, 2018 at 12:56 PM, Sharan Basappa wrote: > Please let me know if the following understanding of mine is correct. > I need to put the program code in a separate file and organize every > executable code in some form of function. If any code exists outside of > function then it is

testing code

2018-07-05 Thread Sharan Basappa
Hi All, I am new to Python though not new to programming. I have implemented my first program in python that uses ML to do some classification task. The whole code is in a single file currently. It contains executable code as well as functions. At the end of the program, I have series of calls

[issue33644] Fix signatures of tp_finalize handlers in testing code.

2018-05-26 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue33644] Fix signatures of tp_finalize handlers in testing code.

2018-05-26 Thread Serhiy Storchaka
Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment: New changeset 9ba3be4718bdf82e20280980807e054004a9bade by Serhiy Storchaka (Miss Islington (bot)) in branch '3.6': bpo-33644: Fix signatures of tp_finalize handlers in testing code. (GH-7111) (GH-7125) https://github.com/

[issue33644] Fix signatures of tp_finalize handlers in testing code.

2018-05-26 Thread miss-islington
miss-islington <mariatta.wijaya+miss-isling...@gmail.com> added the comment: New changeset 14d289be60a2ad4cb65990a63ed2e75e9a8cb3ec by Miss Islington (bot) in branch '3.7': bpo-33644: Fix signatures of tp_finalize handlers in testing code. (GH-7111) https://github.com/python/cpython/

[issue33644] Fix signatures of tp_finalize handlers in testing code.

2018-05-26 Thread miss-islington
Change by miss-islington : -- pull_requests: +6760 ___ Python tracker ___

[issue33644] Fix signatures of tp_finalize handlers in testing code.

2018-05-26 Thread miss-islington
Change by miss-islington : -- pull_requests: +6759 ___ Python tracker ___

[issue33644] Fix signatures of tp_finalize handlers in testing code.

2018-05-26 Thread Serhiy Storchaka
Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment: New changeset 19de8b3dd742fb53681478ad4fff57ed7c37a953 by Serhiy Storchaka in branch 'master': bpo-33644: Fix signatures of tp_finalize handlers in testing code. (GH-7111) https://github.com/python/cpython/

[issue33644] Fix signatures of tp_finalize handlers in testing code.

2018-05-25 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +6750 stage: -> patch review ___ Python tracker ___

[issue33644] Fix signatures of tp_finalize handlers in testing code.

2018-05-25 Thread Serhiy Storchaka
onents: Tests messages: 317662 nosy: serhiy.storchaka priority: normal severity: normal status: open title: Fix signatures of tp_finalize handlers in testing code. type: behavior versions: Python 3.6, Python 3.7, Python 3.8 ___ Python tracker <rep...@bugs.p

Re: testing code in python source package

2009-09-21 Thread Ben Finney
Peng Yu pengyu...@gmail.com writes: I'm wondering if the development of python is test driven. If it is, where in the Python-2.6.2 source directory is the test code for the modules in ./Lib? A great majority of your many questions in this forum are already answered in the available

testing code in python source package

2009-09-20 Thread Peng Yu
Hi, I'm wondering if the development of python is test driven. If it is, where in the Python-2.6.2 source directory is the test code for the modules in ./Lib? Regards, Peng -- http://mail.python.org/mailman/listinfo/python-list

Re: testing code in python source package

2009-09-20 Thread alex23
Peng Yu pengyu...@gmail.com wrote: I'm wondering if the development of python is test driven. If it is, where in the Python-2.6.2 source directory is the test code for the modules in ./Lib? Unsurprisingly, they're located in Lib/test. Is it _really_ that difficult to find? --

proxy testing code with multi-thread

2008-02-01 Thread [EMAIL PROTECTED]
hi all I'm now meeting some problem when using threading to test whether or not a proxy is good or not and the total number of proxies is just 60 but each time my programme stopped just at approaching the end, say, for each proxy I made a proxy but it just stopped working at maybe 58 or 59 or some

Re: testing -- what to do for testing code with behaviour dependant upon which files exist?

2005-04-04 Thread Brian van den Broek
Brian van den Broek [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi all, I'm just starting to employ unit testing (I'm using doctest), and I am uncertain how to handle writing tests where the behaviour being tested is dependant on whether certain file paths point to actual files.

Re: testing -- what to do for testing code with behaviour dependant upon which files exist?

2005-04-04 Thread Jeremy Bowers
On Mon, 04 Apr 2005 17:02:20 -0400, Brian van den Broek wrote: Jeremy suggested using a directory name akin to C:\onlyanidiotwouldhavethisdirecotrynameonadrive. That is what I had settled on before I posted. Somehow it feels unhappy and inelegant. But, I'm a bit less uncomfortable with it

Re: testing -- what to do for testing code with behaviour dependant upon which files exist?

2005-04-04 Thread Brian van den Broek
Jeremy Bowers said unto the world upon 2005-04-04 17:26: On Mon, 04 Apr 2005 17:02:20 -0400, Brian van den Broek wrote: Jeremy suggested using a directory name akin to C:\onlyanidiotwouldhavethisdirecotrynameonadrive. That is what I had settled on before I posted. Somehow it feels unhappy and

testing -- what to do for testing code with behaviour dependant upon which files exist?

2005-04-02 Thread Brian van den Broek
Hi all, I'm just starting to employ unit testing (I'm using doctest), and I am uncertain how to handle writing tests where the behaviour being tested is dependant on whether certain file paths point to actual files. I have a class which takes, in its __init__, a list of file paths to process.

Re: testing -- what to do for testing code with behaviour dependant upon which files exist?

2005-04-02 Thread Andr Malo
* Brian van den Broek wrote: The relevant part of the validation method code looks like: # self.universe_files is a list of file paths non_existent_files = [ x for x in self.universe_files if not os.path.isfile(x) ] if

Re: testing -- what to do for testing code with behaviour dependant upon which files exist?

2005-04-02 Thread Grig Gheorghiu
Can't you use the tempfile module to generate unique names for non-existent files and directories? Take a look at http://www.python.org/doc/lib/module-tempfile.html -- it works on all supported platforms. Grig -- http://mail.python.org/mailman/listinfo/python-list

Re: testing -- what to do for testing code with behaviour dependant upon which files exist?

2005-04-02 Thread Jeremy Bowers
On Sat, 02 Apr 2005 15:30:13 -0500, Brian van den Broek wrote: So, how does one handle such cases with tests? When I had a similar situation, I created a directory for testing that was in a known state, and tested on that. If you can test based on a relative directory, that should work OK.

Re: testing -- what to do for testing code with behaviour dependant upon which files exist?

2005-04-02 Thread Terry Reedy
Brian van den Broek [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi all, I'm just starting to employ unit testing (I'm using doctest), and I am uncertain how to handle writing tests where the behaviour being tested is dependant on whether certain file paths point to actual