• Home
  • Raw
  • Download

Lines Matching refs:cmd

6 from distutils.cmd import Command
19 self.cmd = MyCmd(dist)
23 cmd = self.cmd
24 cmd.not_string_list = ['one', 2, 'three']
25 cmd.yes_string_list = ['one', 'two', 'three']
26 cmd.not_string_list2 = object()
27 cmd.yes_string_list2 = 'ok'
28 cmd.ensure_string_list('yes_string_list')
29 cmd.ensure_string_list('yes_string_list2')
32 cmd.ensure_string_list, 'not_string_list')
35 cmd.ensure_string_list, 'not_string_list2')
37 cmd.option1 = 'ok,dok'
38 cmd.ensure_string_list('option1')
39 self.assertEqual(cmd.option1, ['ok', 'dok'])
41 cmd.option2 = ['xxx', 'www']
42 cmd.ensure_string_list('option2')
44 cmd.option3 = ['ok', 2]
45 self.assertRaises(DistutilsOptionError, cmd.ensure_string_list,
51 cmd = self.cmd
54 self.assertRaises(TypeError, cmd.make_file,
60 cmd.force = True
61 cmd.execute = _execute
62 cmd.make_file(infiles='in', outfile='out', func='func', args=())
69 cmd = self.cmd
70 cmd.announce = _announce
71 cmd.option1 = 1
72 cmd.option2 = 1
73 cmd.user_options = [('option1', '', ''), ('option2', '', '')]
74 cmd.dump_options()
81 cmd = self.cmd
82 cmd.option1 = 'ok'
83 cmd.ensure_string('option1')
85 cmd.option2 = None
86 cmd.ensure_string('option2', 'xxx')
87 self.assertTrue(hasattr(cmd, 'option2'))
89 cmd.option3 = 1
90 self.assertRaises(DistutilsOptionError, cmd.ensure_string, 'option3')
93 cmd = self.cmd
94 cmd.option1 = __file__
95 cmd.ensure_filename('option1')
96 cmd.option2 = 'xxx'
97 self.assertRaises(DistutilsOptionError, cmd.ensure_filename, 'option2')
100 cmd = self.cmd
101 cmd.option1 = os.path.dirname(__file__) or os.curdir
102 cmd.ensure_dirname('option1')
103 cmd.option2 = 'xxx'
104 self.assertRaises(DistutilsOptionError, cmd.ensure_dirname, 'option2')
107 cmd = self.cmd
109 cmd.debug_print('xxx')
116 cmd.debug_print('xxx')