Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(89)

Side by Side Diff: Lib/distutils/tests/test_install_headers.py

Issue 3232042: #9424: convert deprecated assert methods in the Python test suite Base URL: http://svn.python.org/projects/python/branches/py3k/
Patch Set: Minor cleanups Created 14 years, 2 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Lib/distutils/tests/test_install_data.py ('k') | Lib/distutils/tests/test_install_lib.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 """Tests for distutils.command.install_headers.""" 1 """Tests for distutils.command.install_headers."""
2 import sys 2 import sys
3 import os 3 import os
4 import unittest 4 import unittest
5 import getpass 5 import getpass
6 6
7 from distutils.command.install_headers import install_headers 7 from distutils.command.install_headers import install_headers
8 from distutils.tests import support 8 from distutils.tests import support
9 from test.support import run_unittest 9 from test.support import run_unittest
10 10
11 class InstallHeadersTestCase(support.TempdirManager, 11 class InstallHeadersTestCase(support.TempdirManager,
12 support.LoggingSilencer, 12 support.LoggingSilencer,
13 support.EnvironGuard, 13 support.EnvironGuard,
14 unittest.TestCase): 14 unittest.TestCase):
15 15
16 def test_simple_run(self): 16 def test_simple_run(self):
17 # we have two headers 17 # we have two headers
18 header_list = self.mkdtemp() 18 header_list = self.mkdtemp()
19 header1 = os.path.join(header_list, 'header1') 19 header1 = os.path.join(header_list, 'header1')
20 header2 = os.path.join(header_list, 'header2') 20 header2 = os.path.join(header_list, 'header2')
21 self.write_file(header1) 21 self.write_file(header1)
22 self.write_file(header2) 22 self.write_file(header2)
23 headers = [header1, header2] 23 headers = [header1, header2]
24 24
25 pkg_dir, dist = self.create_dist(headers=headers) 25 pkg_dir, dist = self.create_dist(headers=headers)
26 cmd = install_headers(dist) 26 cmd = install_headers(dist)
27 self.assertEquals(cmd.get_inputs(), headers) 27 self.assertEqual(cmd.get_inputs(), headers)
28 28
29 # let's run the command 29 # let's run the command
30 cmd.install_dir = os.path.join(pkg_dir, 'inst') 30 cmd.install_dir = os.path.join(pkg_dir, 'inst')
31 cmd.ensure_finalized() 31 cmd.ensure_finalized()
32 cmd.run() 32 cmd.run()
33 33
34 # let's check the results 34 # let's check the results
35 self.assertEquals(len(cmd.get_outputs()), 2) 35 self.assertEqual(len(cmd.get_outputs()), 2)
36 36
37 def test_suite(): 37 def test_suite():
38 return unittest.makeSuite(InstallHeadersTestCase) 38 return unittest.makeSuite(InstallHeadersTestCase)
39 39
40 if __name__ == "__main__": 40 if __name__ == "__main__":
41 run_unittest(test_suite()) 41 run_unittest(test_suite())
OLDNEW
« no previous file with comments | « Lib/distutils/tests/test_install_data.py ('k') | Lib/distutils/tests/test_install_lib.py » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b