Skip to content

Commit

Permalink
better testing
Browse files Browse the repository at this point in the history
  • Loading branch information
iTaybb committed Feb 20, 2019
1 parent c4d9066 commit 4136f56
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ pip-log.txt

# Unit test / coverage reports
.coverage
coverage.xml
.tox

#Translations
Expand Down
6 changes: 5 additions & 1 deletion test/test_pySmartDL.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@
import json
import math
import unittest
import warnings
from pathlib import Path

sys.path.insert(0, str(Path(__file__).parent.parent))

sys.path.append('..')
import pySmartDL

#
Expand All @@ -18,6 +21,7 @@

class TestSmartDL(unittest.TestCase):
def setUp(self):
warnings.filterwarnings("ignore", category=ResourceWarning, message="unclosed.*<ssl.SSLSocket.*>")
self.dl_dir = os.path.join(os.getenv('tmp'), "".join([random.choice(string.ascii_letters+string.digits) for i in range(8)]), '')
while os.path.exists(self.dl_dir):
self.dl_dir = os.path.join(os.getenv('tmp'), "".join([random.choice(string.ascii_letters+string.digits) for i in range(8)]), '')
Expand Down

0 comments on commit 4136f56

Please sign in to comment.