This file is indexed.

/usr/share/pyshared/epsilon/test/mantissa-structure.py is in python-epsilon 0.6.0-3.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
import sys
import os

from os.path import join as opj

projectName = sys.argv[1]

topDir = projectName.capitalize()
codeDir = projectName.lower()

os.mkdir(topDir)
os.mkdir(opj(topDir, codeDir))

file(opj(topDir, codeDir, '__init__.py'), 'w').write("""
# Don't put code here.
from twisted.python.versions import Version
version = Version(%r, 0, 0, 1)

""" %(codeDir,))

file(opj(topDir, codeDir, codeDir+'_model.py'),
     'w').write("""

from axiom.item import Item
from axiom.attributes import text, bytes, integer, reference

class %sStart(Item):
    schemaVersion = 1           # First version of this object.
    typeName = '%s_start'       # Database table name.

    name = text()               # We must have at least one attribute - model
                                # objects must store data.

    def explode(self):
        raise Exception('these should fail until you write some tests!')

""" % (topDir, codeDir))

os.mkdir(opj(topDir, codeDir, 'test'))

file(opj(topDir, codeDir, 'test', '__init__.py'), 'w').write(
    "# Don't put code here.")

file(opj(topDir, codeDir, 'test', 'test_'+codeDir+'.py'),
     'w').write("""

from axiom.store import Store

from twisted.trial import unittest
from %s import %s_model

class BasicTest(unittest.TestCase):
    def setUp(self):
        self.store = Store()

    def testUserWroteTests(self):
        o = %s_model.%sStart(store=self.store,
                    name=u'Test Object')
        self.assertEquals(1, 0)
        o.explode()

    def tearDown(self):
        self.store.close()

""" % (codeDir, codeDir, codeDir, topDir))