Skip to content
Snippets Groups Projects

Introduced log file option

Merged Adham Hashibon requested to merge add-logging-file into master
11 files
+ 137
82
Compare changes
  • Side-by-side
  • Inline
Files
11
@@ -25,8 +25,10 @@ def fixture_dir():
@@ -25,8 +25,10 @@ def fixture_dir():
class TestExecution(unittest.TestCase):
class TestExecution(unittest.TestCase):
def test_plain_invocation_mco(self):
def test_plain_invocation_mco(self):
with cd(fixtures.dirpath()):
with cd(fixtures.dirpath()):
out = subprocess.check_call(["force_bdss", "test_empty.json"])
try:
self.assertEqual(out, 0)
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):
def test_plain_invocation_evaluate(self):
with cd(fixtures.dirpath()):
with cd(fixtures.dirpath()):
@@ -41,13 +43,16 @@ class TestExecution(unittest.TestCase):
@@ -41,13 +43,16 @@ class TestExecution(unittest.TestCase):
def test_unsupported_file_input(self):
def test_unsupported_file_input(self):
with cd(fixtures.dirpath()):
with cd(fixtures.dirpath()):
with self.assertRaises(subprocess.CalledProcessError):
with self.assertRaises(subprocess.CalledProcessError):
subprocess.check_call(["force_bdss", "test_csv_v2.json"])
subprocess.check_output(
 
["force_bdss", "test_csv_v2.json"],
 
stderr=subprocess.STDOUT)
def test_corrupted_file_input(self):
def test_corrupted_file_input(self):
with cd(fixtures.dirpath()):
with cd(fixtures.dirpath()):
with self.assertRaises(subprocess.CalledProcessError):
with self.assertRaises(subprocess.CalledProcessError):
subprocess.check_call(["force_bdss",
subprocess.check_output(
"test_csv_corrupted.json"])
["force_bdss", "test_csv_corrupted.json"],
 
stderr=subprocess.STDOUT)
if __name__ == '__main__':
if __name__ == '__main__':
Loading