Skip to content

Commit

Permalink
Fix on the unittests
Browse files Browse the repository at this point in the history
  • Loading branch information
nunobrum committed Sep 15, 2024
1 parent 17290af commit d32a9cb
Show file tree
Hide file tree
Showing 15 changed files with 23 additions and 21 deletions.
6 changes: 3 additions & 3 deletions examples/testfiles/AC - STEP_1.log
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
LTspice 24.0.9 for Windows
LTspice 24.0.11 for Windows
Circuit: * C:\sandbox\PyLTSpice\examples\testfiles\AC - STEP.asc
Start Time: Sat Mar 16 10:34:33 2024
Start Time: Sun Sep 15 18:34:39 2024
solver = Normal
Maximum thread count: 16

Expand All @@ -12,5 +12,5 @@ tnom = 27
temp = 27
method = modified trap
.step r1=10000
Total elapsed time: 0.006 seconds.
Total elapsed time: 0.005 seconds.

Binary file modified examples/testfiles/AC - STEP_1.raw
Binary file not shown.
6 changes: 3 additions & 3 deletions examples/testfiles/AC_1.log
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
LTspice 24.0.9 for Windows
LTspice 24.0.11 for Windows
Circuit: * C:\sandbox\PyLTSpice\examples\testfiles\AC.asc
Start Time: Sat Mar 16 10:34:30 2024
Start Time: Sun Sep 15 18:34:37 2024
solver = Normal
Maximum thread count: 16
tnom = 27
temp = 27
method = modified trap
.OP point found by inspection.
Total elapsed time: 0.049 seconds.
Total elapsed time: 0.023 seconds.

Binary file modified examples/testfiles/AC_1.raw
Binary file not shown.
6 changes: 3 additions & 3 deletions examples/testfiles/Batch_Test_1.log
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
LTspice 24.0.9 for Windows
LTspice 24.0.11 for Windows
Circuit: * C:\sandbox\PyLTSpice\examples\testfiles\Batch_Test.asc
Start Time: Sat Mar 16 10:34:41 2024
Start Time: Sun Sep 15 18:34:45 2024
solver = Normal
Maximum thread count: 16
tnom = 27
Expand Down Expand Up @@ -52,5 +52,5 @@ gain: vout_rms/vin_rms=1.99808
vout1m: v(out)=-0.0187828 at 0.001
period: time=1.49937e-10 at 1.49937e-10

Total elapsed time: 0.054 seconds.
Total elapsed time: 0.055 seconds.

Binary file modified examples/testfiles/Batch_Test_1.raw
Binary file not shown.
6 changes: 3 additions & 3 deletions examples/testfiles/DC op point - STEP_1.log
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
LTspice 24.0.9 for Windows
LTspice 24.0.11 for Windows
Circuit: * C:\sandbox\PyLTSpice\examples\testfiles\DC op point - STEP.asc
Start Time: Sat Mar 16 10:34:45 2024
Start Time: Sun Sep 15 18:34:49 2024
solver = Normal
Maximum thread count: 16

Expand Down Expand Up @@ -34,5 +34,5 @@ Direct Newton iteration for .op point succeeded.
tnom = 27
temp = 27
method = modified trap
Total elapsed time: 0.012 seconds.
Total elapsed time: 0.011 seconds.

Binary file modified examples/testfiles/DC op point - STEP_1.raw
Binary file not shown.
6 changes: 3 additions & 3 deletions examples/testfiles/DC op point_1.log
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
LTspice 24.0.9 for Windows
LTspice 24.0.11 for Windows
Circuit: * C:\sandbox\PyLTSpice\examples\testfiles\DC op point.asc
Start Time: Sat Mar 16 10:34:43 2024
Start Time: Sun Sep 15 18:34:47 2024
solver = Normal
Maximum thread count: 16
tnom = 27
temp = 27
method = modified trap
Direct Newton iteration for .op point succeeded.
Total elapsed time: 0.003 seconds.
Total elapsed time: 0.004 seconds.

Binary file modified examples/testfiles/DC op point_1.raw
Binary file not shown.
6 changes: 3 additions & 3 deletions examples/testfiles/TRAN - STEP_1.log
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
LTspice 24.0.9 for Windows
LTspice 24.0.11 for Windows
Circuit: * C:\sandbox\PyLTSpice\examples\testfiles\TRAN - STEP.asc
Start Time: Sat Mar 16 10:34:58 2024
Start Time: Sun Sep 15 18:35:00 2024
solver = Normal
Maximum thread count: 16

Expand Down Expand Up @@ -57,5 +57,5 @@ Measurement: t5
3 0.393469 0.005
4 3.93469 0.005

Total elapsed time: 0.022 seconds.
Total elapsed time: 0.023 seconds.

Binary file modified examples/testfiles/TRAN - STEP_1.raw
Binary file not shown.
4 changes: 2 additions & 2 deletions examples/testfiles/TRAN_1.log
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
LTspice 24.0.9 for Windows
LTspice 24.0.11 for Windows
Circuit: * C:\sandbox\PyLTSpice\examples\testfiles\TRAN.asc
Start Time: Sat Mar 16 10:34:56 2024
Start Time: Sun Sep 15 18:34:58 2024
solver = Normal
Maximum thread count: 16
tnom = 27
Expand Down
Binary file modified examples/testfiles/TRAN_1.raw
Binary file not shown.
4 changes: 3 additions & 1 deletion unittests/test_pyltspice.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@
def has_ltspice_detect():
from PyLTSpice.sim.ltspice_simulator import LTspice
ltspice = LTspice
return isinstance(ltspice.spice_exe, list) and os.path.exists(ltspice.spice_exe[0])
return (isinstance(ltspice.spice_exe, list) and
len(ltspice.spice_exe) > 0 and
any(os.path.exists(exe) for exe in ltspice.spice_exe))


# ------------------------------------------------------------------------------
Expand Down

0 comments on commit d32a9cb

Please sign in to comment.