shsmi_sysdb_nex/test_functions.py

21 lines
730 B
Python

# coding=utf-8
import unittest
from functions import *
class TestFunctions(unittest.TestCase):
def test_run_command(self):
python_path = str(u'C:/Python27/ArcGIS10.2/python.exe ').encode('gb2312')
script = str(u'sde_fc2fc.py ').encode('gb2312')
type_cmd = str(u'feature ').encode('gb2312')
fc_name_cmd = str(u'Building_A ').encode('gb2312')
out_cmd = str(u'Building_A ').encode('gb2312')
fc_cur_cmd = str(u'Building_A ').encode('gb2312')
# exp_cmd = str(u'"" ')
command_string = python_path + script + type_cmd + fc_name_cmd + out_cmd + fc_cur_cmd
rst, out = run_command(command_string)
print(out)
self.assertEqual(rst, True)