Skip to content

Commit

Permalink
Creating a Test File (#138)
Browse files Browse the repository at this point in the history
Testing out test files.
  • Loading branch information
kjkoeller authored Apr 2, 2023
1 parent ed2bd02 commit 73ea128
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions EclipsingBinaries/tests/test_OC_plot.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
from .OC_plot import calculate_oc


def test_calculate_oc():
# Test case 1: Test when T0 = 0
m = 10.0
err = 0.1
T0 = 0
T0_err = 0.1
p = 1.0
e, OC, OC_err, T0, T0_err = calculate_oc(m, err, T0, T0_err, p)
assert e == 10.0
assert OC == "0.00000"
assert OC_err == "0.14142"

# Test case 2: Test when T0 != 0
m = 15.0
err = 0.1
T0 = 5.0
T0_err = 0.1
p = 2.0
e, OC, OC_err, T0, T0_err = calculate_oc(m, err, T0, T0_err, p)
assert e == 5.0
assert OC == "0.00000"
assert OC_err == "0.14142"

0 comments on commit 73ea128

Please sign in to comment.