File tree 3 files changed +8
-4
lines changed
3 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,6 @@ def _print_kd0(kd0: Quantity) -> None:
24
24
return
25
25
# The value is less than 0.1 pM or greater than 100 M
26
26
if kd < 1e-10 :
27
- print (f"{ kd / 1e-12 :#.3g} fM" )
27
+ print (f"{ kd / 1e-15 :#.3g} fM" )
28
28
else :
29
29
print (f"{ kd :#.3g} M" )
Original file line number Diff line number Diff line change 1
1
from io import StringIO
2
- from unittest .mock import patch , Mock
2
+ from unittest .mock import patch
3
3
from k2dg ._cli import run_cli # Replace 'your_module' with the actual module name
4
4
5
5
Original file line number Diff line number Diff line change @@ -25,6 +25,10 @@ def test_print_kd0(capsys):
25
25
captured = capsys .readouterr ()
26
26
assert captured .out == "10.0 mM\n "
27
27
28
- _print_kd0 (Q_ (1e2 , "M" ))
28
+ _print_kd0 (Q_ (1e4 , "M" ))
29
29
captured = capsys .readouterr ()
30
- assert captured .out == "100. M\n "
30
+ assert captured .out == "1.00e+04 M\n "
31
+
32
+ _print_kd0 (Q_ (1e-16 , "M" ))
33
+ captured = capsys .readouterr ()
34
+ assert captured .out == "0.100 fM\n "
You can’t perform that action at this time.
0 commit comments