Skip to content
Snippets Groups Projects
Commit 0dccd4ba authored by Stefano Borini's avatar Stefano Borini
Browse files

Silenced all output and fixed tests

parent ad1b4703
No related branches found
No related tags found
1 merge request!108Introduced log file option
......@@ -3,8 +3,6 @@ import subprocess
import os
from contextlib import contextmanager
import six
from force_bdss.tests import fixtures
......@@ -27,8 +25,10 @@ def fixture_dir():
class TestExecution(unittest.TestCase):
def test_plain_invocation_mco(self):
with cd(fixtures.dirpath()):
out = subprocess.check_call(["force_bdss", "test_empty.json"])
self.assertEqual(out, 0)
try:
subprocess.check_output(["force_bdss", "test_empty.json"])
except subprocess.CalledProcessError:
self.fail("force_bdss returned error at plain invocation.")
def test_plain_invocation_evaluate(self):
with cd(fixtures.dirpath()):
......@@ -43,18 +43,16 @@ class TestExecution(unittest.TestCase):
def test_unsupported_file_input(self):
with cd(fixtures.dirpath()):
with self.assertRaises(subprocess.CalledProcessError):
subprocess.check_call(
subprocess.check_output(
["force_bdss", "test_csv_v2.json"],
stdout=os.devnull,
stderr=os.devnull)
stderr=subprocess.STDOUT)
def test_corrupted_file_input(self):
with cd(fixtures.dirpath()):
with self.assertRaises(subprocess.CalledProcessError):
subprocess.check_call(
subprocess.check_output(
["force_bdss", "test_csv_corrupted.json"],
stdout=os.devnull,
stderr=os.devnull)
stderr=subprocess.STDOUT)
if __name__ == '__main__':
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment