Re: How to test input via subprocess.Popen with data from file

2022-03-11 Thread Tobiah
Why not just have scripts that echo out the various sets of test data you are interested in? That way, Popen would always be your interface and you wouldn't have to make two cases in the consumer script. In other words, make program that outputs test data just like your main data source

Re: How to test input via subprocess.Popen with data from file

2022-03-11 Thread Roel Schroeven
Op 11/03/2022 om 10:11 schreef Roel Schroeven: Op 10/03/2022 om 13:16 schreef Loris Bennett: Hi, I have a command which produces output like the following:    Job ID: 9431211    Cluster: curta    User/Group: build/staff    State: COMPLETED (exit code 0)    Nodes: 1    Cores per node: 8    CPU

Re: How to test input via subprocess.Popen with data from file

2022-03-11 Thread Roel Schroeven
Op 10/03/2022 om 13:16 schreef Loris Bennett: Hi, I have a command which produces output like the following: Job ID: 9431211 Cluster: curta User/Group: build/staff State: COMPLETED (exit code 0) Nodes: 1 Cores per node: 8 CPU Utilized: 01:30:53 CPU Efficiency: 83.63% of

Re: How to test input via subprocess.Popen with data from file

2022-03-10 Thread Dieter Maurer
Loris Bennett wrote at 2022-3-11 07:40 +0100: > ... I want to test the parsing ... >Sorry if I was unclear but my question is: > >Given that the return value from Popen is a Popen object and given that >the return value from reading a file is a single string or maybe a list >of strings, what

Re: How to test input via subprocess.Popen with data from file

2022-03-10 Thread Loris Bennett
Dieter Maurer writes: > Loris Bennett wrote at 2022-3-10 13:16 +0100: >>I have a command which produces output like the >>following: >> >> Job ID: 9431211 >> Cluster: curta >> User/Group: build/staff >> State: COMPLETED (exit code 0) >> Nodes: 1 >> Cores per node: 8 >> CPU Utilized:

Re: How to test input via subprocess.Popen with data from file

2022-03-10 Thread Dieter Maurer
Loris Bennett wrote at 2022-3-10 13:16 +0100: >I have a command which produces output like the >following: > > Job ID: 9431211 > Cluster: curta > User/Group: build/staff > State: COMPLETED (exit code 0) > Nodes: 1 > Cores per node: 8 > CPU Utilized: 01:30:53 > CPU Efficiency: 83.63% of

How to test input via subprocess.Popen with data from file

2022-03-10 Thread Loris Bennett
Hi, I have a command which produces output like the following: Job ID: 9431211 Cluster: curta User/Group: build/staff State: COMPLETED (exit code 0) Nodes: 1 Cores per node: 8 CPU Utilized: 01:30:53 CPU Efficiency: 83.63% of 01:48:40 core-walltime Job Wall-clock time: 00:13:35