summaryrefslogtreecommitdiff
path: root/xnt/tests/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'xnt/tests/__init__.py')
-rw-r--r--xnt/tests/__init__.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/xnt/tests/__init__.py b/xnt/tests/__init__.py
index 44aacd8..b2f6702 100644
--- a/xnt/tests/__init__.py
+++ b/xnt/tests/__init__.py
@@ -1,4 +1,5 @@
#!/usr/bin/env python
+"""Tests Module"""
# Xnt -- A Wrapper Build Tool
# Copyright (C) 2012 Kenny Ballou
@@ -16,3 +17,22 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
+import os
+import shutil
+
+def set_up():
+ """Shared Setup Code"""
+ os.mkdir("temp")
+ os.mkdir("temp/testfolder1")
+ for i in range(1, 5):
+ with open("temp/testfile" + str(i), "w") as test_file:
+ test_file.write("this is a test file")
+ with open("temp/test.py", "w") as test:
+ test.write("#!/usr/bin/env python\n")
+ test.write("import sys\n")
+ test.write("sys.stdout.write(sys.argv[1])\n")
+ test.write("sys.stderr.write(sys.argv[2])\n")
+
+def tear_down():
+ """Shared Teardown Code"""
+ shutil.rmtree("temp")