Skip to content

Commit

Permalink
remove setcheckinterval/setswitchinterval to unit tests only
Browse files Browse the repository at this point in the history
fixes #376
  • Loading branch information
casperdcl committed Jul 22, 2017
1 parent c0a402a commit 2189a2b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 0 additions & 3 deletions tqdm/_tqdm.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,6 @@ class TMonitor(Thread):
_sleep = None

def __init__(self, tqdm_cls, sleep_interval):
# setcheckinterval is deprecated
getattr(sys, 'setswitchinterval',
getattr(sys, 'setcheckinterval'))(100)
Thread.__init__(self)
self.daemon = True # kill thread when main killed (KeyboardInterrupt)
self.was_killed = False
Expand Down
4 changes: 4 additions & 0 deletions tqdm/tests/tests_tqdm.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,10 @@ def cpu_timify(t, timer=None):


def pretest():
# setcheckinterval is deprecated
getattr(sys, 'setswitchinterval',
getattr(sys, 'setcheckinterval'))(100)

if getattr(tqdm, "_instances", False):
n = len(tqdm._instances)
if n:
Expand Down

0 comments on commit 2189a2b

Please sign in to comment.