summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoragronholm <devnull@localhost>2011-02-06 08:34:30 +0200
committeragronholm <devnull@localhost>2011-02-06 08:34:30 +0200
commit5e5c788adfbfa6b7351c25233b1ac5104c61a089 (patch)
tree49b2637f6f552bfbb2c034ff6ec603a0aaeb8a75
parente2ca291614b66f5e096ae6b24398b1a2ca076a42 (diff)
downloadapscheduler-5e5c788adfbfa6b7351c25233b1ac5104c61a089.tar.gz
Removed __lt__ from Job -- it has no use really, and would require __gt__ to properly implement the semantics on PyPy
-rw-r--r--apscheduler/job.py5
-rw-r--r--tests/apschedulertests/testjob.py7
2 files changed, 0 insertions, 12 deletions
diff --git a/apscheduler/job.py b/apscheduler/job.py
index fe196d4..9e87108 100644
--- a/apscheduler/job.py
+++ b/apscheduler/job.py
@@ -94,11 +94,6 @@ class Job(object):
state['_lock'] = Lock()
self.__dict__ = state
- def __lt__(self, other):
- if isinstance(other, Job):
- return self.next_run_time < other.next_run_time
- return NotImplemented
-
def __eq__(self, other):
if isinstance(other, Job):
return self.id is not None and other.id == self.id or self is other
diff --git a/tests/apschedulertests/testjob.py b/tests/apschedulertests/testjob.py
index 20c7de5..0858b6c 100644
--- a/tests/apschedulertests/testjob.py
+++ b/tests/apschedulertests/testjob.py
@@ -36,13 +36,6 @@ class TestJob(object):
self.job.compute_next_run_time(self.RUNTIME)
eq_(self.job.next_run_time, None)
- def test_jobs_compare(self):
- job2 = Job(SimpleTrigger(self.RUNTIME + timedelta(microseconds=1)),
- dummyfunc, [], {})
- self.job.compute_next_run_time(self.RUNTIME)
- job2.compute_next_run_time(self.RUNTIME)
- assert job2 > self.job
-
def test_getstate(self):
state = self.job.__getstate__()
eq_(state, dict(trigger=self.trigger,