aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJauhien Piatlicki (jauhien) <piatlicki@gmail.com>2013-07-01 21:33:34 +0200
committerJauhien Piatlicki (jauhien) <piatlicki@gmail.com>2013-07-01 21:33:34 +0200
commit23e01324f86644a93701bf17819a55a51dbac72f (patch)
tree1a05d670860c95dba37e531454dd0f3ebb64b03a /tests
parentg_sorcery/metadata: default_schema (diff)
downloadg-sorcery-23e01324f86644a93701bf17819a55a51dbac72f.tar.gz
g-sorcery-23e01324f86644a93701bf17819a55a51dbac72f.tar.bz2
g-sorcery-23e01324f86644a93701bf17819a55a51dbac72f.zip
executable and the main module added
Diffstat (limited to 'tests')
-rw-r--r--tests/test_g_sorcery.py33
1 files changed, 33 insertions, 0 deletions
diff --git a/tests/test_g_sorcery.py b/tests/test_g_sorcery.py
new file mode 100644
index 0000000..7241b19
--- /dev/null
+++ b/tests/test_g_sorcery.py
@@ -0,0 +1,33 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+"""
+ test_g_sorcery.py
+ ~~~~~~~~~~~~~~~~~
+
+ executable and main module test suite
+
+ :copyright: (c) 2013 by Jauhien Piatlicki
+ :license: GPL-2, see LICENSE for more details.
+"""
+
+import os, subprocess, tempfile, unittest
+
+class TestBin(unittest.TestCase):
+ def setUp(self):
+ self.tempdir = tempfile.TemporaryDirectory()
+
+ def tearDown(self):
+ del self.tempdir
+
+ def test_g_sorcery(self):
+ binpath = os.path.join(os.path.split(
+ os.path.dirname(os.path.realpath(__file__)))[0], 'bin')
+ binary = os.path.join(binpath, 'g-sorcery')
+ self.assertEqual(subprocess.check_output(binary), b'it works\n')
+
+
+def suite():
+ suite = unittest.TestSuite()
+ suite.addTest(TestBin('test_g_sorcery'))
+ return suite