From 01cc151b5c66d726bc728aae66292cddc13b41e6 Mon Sep 17 00:00:00 2001 From: David Gouldin Date: Tue, 23 May 2017 11:43:48 -0700 Subject: [PATCH] Correcting order of 'in' operator in code and tests --- maya.py | 2 +- test_maya_interval.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/maya.py b/maya.py index d250587..ac460e7 100644 --- a/maya.py +++ b/maya.py @@ -476,7 +476,7 @@ class MayaInterval(object): if isinstance(item, MayaDT): return self.contains_dt(item) - return item.contains(self) + return self.contains(item) def contains_dt(self, dt): return self.start <= dt < self.end diff --git a/test_maya_interval.py b/test_maya_interval.py index 0cd1623..eecbfd8 100755 --- a/test_maya_interval.py +++ b/test_maya_interval.py @@ -187,7 +187,7 @@ def test_interval_contains( ) assert interval1.contains(interval2) is expected - assert (interval1 in interval2) is expected + assert (interval2 in interval1) is expected @pytest.mark.parametrize('start_doy,end_doy,dt_doy,expected', (