Skip to content

Commit

Permalink
TST: Fix running tests with temp files on Windos
Browse files Browse the repository at this point in the history
  • Loading branch information
kernc committed Jun 25, 2019
1 parent 8d35bda commit 4487b82
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions backtesting/test/_test.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import os
import sys
import time
import unittest
import warnings
Expand Down Expand Up @@ -30,6 +31,8 @@
@contextmanager
def _tempfile():
with NamedTemporaryFile(suffix='.html') as f:
if sys.platform.startswith('win'):
f.close()
yield f.name


Expand Down

0 comments on commit 4487b82

Please sign in to comment.