Mocking a function in a process started with multiprocessing.Process

2024-08-27 Thread Norman Robins via Python-list
Is it possible to mock out a function in a process started with multiprocessing.Process? AI tells me it is, but I have not gotten it to work. The use case is that I have a server I want to write tests for. I want the tests to start up the server, but I need to mock out the JWT based auth functions

Re: Triggered By Mediocre Code (Posting On Python-List Prohibited)

2024-08-27 Thread Piergiorgio Sartor via Python-list
On 25/08/2024 23.53, Lawrence D'Oliveiro wrote: Looking at this article about the top three languages for getting programming jobs , naturally I couldn’t help noticing the code in the screenshot at th

Re: Formatting a str as a number

2024-08-27 Thread Grant Edwards via Python-list
On 2024-08-27, Gilmeh Serda via Python-list wrote: > On 25 Aug 2024 15:46:25 GMT, Stefan Ram wrote: > >> f"{int(number):>20,}" > > Great. Thanks. Do you have a link to where that's documented? > > I did web search, found nothing. https://docs.python.org/3/library/string.html#formatspec https://do