コード例 #1
0
    def testWithModules(self):
        """Test what happens when no modules provided."""
        modules = [types.ModuleType('package1'), types.ModuleType('package1')]

        file1 = descriptor.FileDescriptor()
        file1.package = 'package1'
        file2 = descriptor.FileDescriptor()
        file2.package = 'package2'

        expected = descriptor.FileSet()
        expected.files = [file1, file1]

        described = descriptor.describe_file_set(modules)
        described.check_initialized()
        self.assertEquals(expected, described)
コード例 #2
0
    def testWithModules(self):
        """Test what happens when no modules provided."""
        modules = [types.ModuleType('package1'), types.ModuleType('package1')]

        file1 = descriptor.FileDescriptor()
        file1.package = 'package1'
        file2 = descriptor.FileDescriptor()
        file2.package = 'package2'

        expected = descriptor.FileSet()
        expected.files = [file1, file1]

        described = descriptor.describe_file_set(modules)
        described.check_initialized()
        self.assertEquals(expected, described)
コード例 #3
0
 def testNoModules(self):
     """Test what happens when no modules provided."""
     described = descriptor.describe_file_set([])
     described.check_initialized()
     # The described FileSet.files will be None.
     self.assertEquals(descriptor.FileSet(), described)
コード例 #4
0
 def testNoModules(self):
     """Test what happens when no modules provided."""
     described = descriptor.describe_file_set([])
     described.check_initialized()
     # The described FileSet.files will be None.
     self.assertEquals(descriptor.FileSet(), described)