Skip to content

Commit

Permalink
skip ex 10 test if BSON not installed
Browse files Browse the repository at this point in the history
  • Loading branch information
computron committed Feb 9, 2016
1 parent 4f68e69 commit d18f220
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions chronograph/tests/test_chronograph.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
import json
import unittest

import time

from bson import json_util

from chronograph.chronograph import Chronograph, get_split_time, get_chronograph, ChronographError, add_chronograph

__author__ = 'Anubhav Jain <[email protected]>'
Expand Down Expand Up @@ -135,6 +132,10 @@ def func2():
self.assertAlmostEqual(cg2.total_elapsed_time, 0.25, 1)

def test_example10(self):
try:
from bson import json_util
except:
raise unittest.SkipTest("bson package not installed")
cg = Chronograph(start_timing=True)
time.sleep(0.25)
cg.split("s2")
Expand Down

0 comments on commit d18f220

Please sign in to comment.