From e23562d567ce664ef3991f060e9161670f544411 Mon Sep 17 00:00:00 2001
From: dh00601 <dh00601@surrey.ac.uk>
Date: Wed, 29 Dec 2021 19:25:14 +0000
Subject: [PATCH] adding tests

---
 badges/test_coverage.svg                 |  4 ++--
 binarycpython/tests/main.py              | 16 +++++++++++++---
 binarycpython/tests/test_useful_funcs.py |  2 +-
 binarycpython/utils/useful_funcs.py      |  2 +-
 4 files changed, 17 insertions(+), 7 deletions(-)

diff --git a/badges/test_coverage.svg b/badges/test_coverage.svg
index bc3407c38..0644a48b3 100644
--- a/badges/test_coverage.svg
+++ b/badges/test_coverage.svg
@@ -15,7 +15,7 @@
     <g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
         <text x="31.5" y="15" fill="#010101" fill-opacity=".3">coverage</text>
         <text x="31.5" y="14">coverage</text>
-        <text x="80" y="15" fill="#010101" fill-opacity=".3">23%</text>
-        <text x="80" y="14">23%</text>
+        <text x="80" y="15" fill="#010101" fill-opacity=".3">26%</text>
+        <text x="80" y="14">26%</text>
     </g>
 </svg>
diff --git a/binarycpython/tests/main.py b/binarycpython/tests/main.py
index 9348e8858..58f4d14a1 100755
--- a/binarycpython/tests/main.py
+++ b/binarycpython/tests/main.py
@@ -40,12 +40,22 @@ from binarycpython.tests.test_functions import (
 )
 # from binarycpython.tests.test_grid import *
 # from binarycpython.tests.test_hpc_functions import *
-# from binarycpython.tests.test_plot_functions import *
+from binarycpython.tests.test_plot_functions import (
+    test_color_by_index,
+    test_plot_system,
+)
 # from binarycpython.tests.test_run_system_wrapper import *
 # from binarycpython.tests.test_spacing_functions import *
-# from binarycpython.tests.test_useful_funcs import *
+from binarycpython.tests.test_useful_funcs import (
+    test_calc_period_from_sep,
+    test_calc_sep_from_period,
+    test_roche_lobe,
+    test_ragb,
+    test_rzams,
+    test_zams_collission,
+)
 # from binarycpython.tests.test_grid_options_defaults import *
-# from binarycpython.tests.test_stellar_types import *
+from binarycpython.tests.test_stellar_types import *
 
 if __name__ == "__main__":
     unittest.main()
diff --git a/binarycpython/tests/test_useful_funcs.py b/binarycpython/tests/test_useful_funcs.py
index 77b4a9e8b..4e5f24bad 100644
--- a/binarycpython/tests/test_useful_funcs.py
+++ b/binarycpython/tests/test_useful_funcs.py
@@ -96,7 +96,7 @@ class test_ragb(unittest.TestCase):
         """
 
         m = 20
-        output = ragb(m, 0.02)
+        output = ragb(m)
 
         self.assertEqual(output, 820)
 
diff --git a/binarycpython/utils/useful_funcs.py b/binarycpython/utils/useful_funcs.py
index d5abce50a..95c6eabab 100644
--- a/binarycpython/utils/useful_funcs.py
+++ b/binarycpython/utils/useful_funcs.py
@@ -9,7 +9,7 @@ Functions:
     - rzams(m, z) gives you the ZAMS radius of a star
     - ZAMS_collision(m1, m2, e, sep, z) returns 1 if stars collide on the ZAMS
     - roche_lobe(q): returns roche lobe radius in units of separation
-    - ragb(m, z): radius at first thermal pulse
+    - ragb(m): radius at first thermal pulse
     - minimum_period_for_RLOF(M1, M2, metallicity, store_memaddr=-1): function to calculate the minimum period that leads to RLOF on ZAMS
     - minimum_separation_for_RLOF(M1, M2, metallicity, store_memaddr=-1): function to calculate the minimum period that leads to RLOF on ZAMS
     - maximum_mass_ratio_for_RLOF(M1, orbital_period, store_memaddr=None): Function to calculate the maximum mass ratio that leads to RLOF on ZAMS
-- 
GitLab