~yerinalexey/pcrond

bf1db15f2011168e936a773e4052dfa0a74d1b4f — Luca Vercelli 2 years ago 61b6791
run test
2 files changed, 2 insertions(+), 3 deletions(-)

M pcrond/sched.py
M test_scheduler.py
M pcrond/sched.py => pcrond/sched.py +0 -1
@@ 189,4 189,3 @@ class Scheduler(object):
            time.sleep(self.delay)
            # FIXME this will look at self.ask_for_stop only every self.delay seconds
            # see https://stackoverflow.com/questions/5114292/break-interrupt-a-time-sleep-in-python


M test_scheduler.py => test_scheduler.py +2 -2
@@ 253,8 253,8 @@ class SchedulerTests(unittest.TestCase):
        thread.join()
        print("Other thread stopped.")
        assert os.path.isfile(os.path.join("tests", "somefile"))
        #FIXME system may be utc or not...
        #assert d.utcfromtimestamp(os.path.getmtime(os.path.join("tests", "somefile"))) >= start_time
        # FIXME system may be utc or not...
        # assert d.utcfromtimestamp(os.path.getmtime(os.path.join("tests", "somefile"))) >= start_time
        assert d.fromtimestamp(os.path.getmtime(os.path.join("tests", "somefile"))) >= start_time

    @unittest.skipUnless(sys.platform.startswith("win"), "requires Windows")