mirror of
https://github.com/andrewferrier/email2pdf.git
synced 2025-03-15 04:34:50 +00:00
Set up tests module.
This commit is contained in:
parent
8d01c76215
commit
1601e0fb87
3 changed files with 6 additions and 3 deletions
2
Makefile
2
Makefile
|
@ -13,7 +13,7 @@ builddeb:
|
|||
fakeroot dpkg-deb --build $(TEMPDIR) .
|
||||
|
||||
unittest:
|
||||
./email2pdf_unittest
|
||||
python3 -m unittest discover
|
||||
|
||||
clean:
|
||||
rm -f *.deb
|
||||
|
|
0
tests/__init__.py
Normal file
0
tests/__init__.py
Normal file
|
@ -30,12 +30,16 @@ def setUpModule():
|
|||
examineDir = tempfile.mkdtemp(dir=examineDir)
|
||||
print("Output examination directory: " + examineDir)
|
||||
|
||||
print("Checking if online... ", end="")
|
||||
sys.stdout.flush()
|
||||
ONLINE_URL = "https://raw.githubusercontent.com/andrewferrier/email2pdf/master"
|
||||
try:
|
||||
requests.get(ONLINE_URL)
|
||||
requests.get(ONLINE_URL, timeout=1)
|
||||
isOnline = True
|
||||
print("Yes.")
|
||||
except:
|
||||
isOnline = False
|
||||
print("No.")
|
||||
|
||||
|
||||
def touch(fname):
|
||||
|
@ -112,7 +116,6 @@ class BaseTestClasses:
|
|||
if outputFile:
|
||||
options.extend(['-o', outputFile])
|
||||
|
||||
options.extend(sys.argv[1:])
|
||||
options.extend(extraParams)
|
||||
|
||||
self.timeInvoked = datetime.now()
|
Loading…
Reference in a new issue