Skip to content

Commit

Permalink
Disable stopwatch in test (was failing due to import error) and fix b…
Browse files Browse the repository at this point in the history
…ad requests version setting
  • Loading branch information
blitzmann committed May 9, 2017
1 parent 3de63c5 commit ccfd414
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pyfa.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ def handleGUIException(exc_type, exc_value, exc_traceback):
if 'wxMac' not in wx.PlatformInfo or ('wxMac' in wx.PlatformInfo and wx.VERSION >= (3, 0)):
try:
import requests
config.requestsVersion = requests.__version
config.requestsVersion = requests.__version__
except ImportError:
raise PreCheckException("Cannot import requests. You can download requests from https://pypi.python.org/pypi/requests.")

Expand Down
10 changes: 5 additions & 5 deletions tests/test_unread_desc.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# nopep8
import re
# from utils.strfunctions import sequential_rep, replace_ltgt
from utils.stopwatch import Stopwatch
#from utils.stopwatch import Stopwatch

script_dir = os.path.dirname(os.path.abspath(__file__))
sys.path.append(os.path.realpath(os.path.join(script_dir, '..')))
Expand Down Expand Up @@ -56,7 +56,7 @@ def on_port_processing(self, action, data=None):
return True


stpw = Stopwatch('test measurementer')
#stpw = Stopwatch('test measurementer')

@pytest.fixture()
def print_db_info():
Expand All @@ -81,8 +81,8 @@ def test_import_xml(print_db_info):
srcString = unicode(srcString, "utf-8")
# (basestring, IPortUser, basestring) -> list[eos.saveddata.fit.Fit]
usr.on_port_process_start()
stpw.reset()
with stpw:
fits = Port.importXml(srcString, usr)
#stpw.reset()
#with stpw:
fits = Port.importXml(srcString, usr)

assert fits is not None and len(fits) is fit_count

0 comments on commit ccfd414

Please sign in to comment.