Re: How to test?

2020-06-19 Thread Terry Reedy
On 6/17/2020 12:34 PM, Tony Flury via Python-list wrote: In a recent application that I wrote (where output to the console was important), I tested it using the 'unittest' framework, and by patching sys.stderr to be a StringIO - that way my test case could inspect what was being output. Tony

Re: Property for dataclass field with default value

2020-06-19 Thread Peter Otten
Ivan Ivanyuk wrote: > On Thu, 18 Jun 2020 at 11:26, Peter Otten <__pete...@web.de> wrote: >> >> Ivan Ivanyuk wrote: >> >> > Hello All, >> > >> > I have some trouble using @dataclass together with @property decorator >> > or property() function. >> > >> > From the documentation and PEP is seems tha

Re: How to test?

2020-06-19 Thread Tony Flury via Python-list
On 24/04/2020 19:40, Manfred Lotz wrote: I have a command like application which checks a directory tree for certain things. If there are errors then messages will be written to stdout. How to test this in the best way? One idea was for the error situations to write messages to files and then

Re: why same ctypes code runs on win7, but not on win10?

2020-06-19 Thread Eryk Sun
On 6/19/20, oyster wrote: > The attachment is a very simple code that uses the DLL from > https://github.com/ying32/govcl to create a GUI application. The code > runs on my python 3.6.10 64 bits with win7 64 bits, but failed on my > python 3.6.10 64 bits and python 3.7.5 with win10 64 bits, by say

why same ctypes code runs on win7, but not on win10?

2020-06-19 Thread oyster
The attachment is a very simple code that uses the DLL from https://github.com/ying32/govcl to create a GUI application. The code runs on my python 3.6.10 64 bits with win7 64 bits, but failed on my python 3.6.10 64 bits and python 3.7.5 with win10 64 bits, by saying following message. What is the