~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to test/test_framework/file_test.py

  • Committer: dilshan_a
  • Date: 2008-01-23 21:55:49 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:278
Added README files to explain the test framework and the examples.

Fixed the filespace tests to that they are up to date.

Show diffs side-by-side

added added

removed removed

Lines of Context:
68
68
f.close()
69
69
 
70
70
print "Writing to read only files"
 
71
f = file("file_4.txt")
71
72
try:
72
 
    file("file_4.txt").write("a")
 
73
    f.write("a")
73
74
    print "Test failed"
74
75
except Exception, e:
75
76
    print e
 
77
f.close()
76
78
 
77
79
print
78
80
print "Reading non-existant files"
84
86
 
85
87
print
86
88
print "Reading form write only files"
 
89
f = file("file_4.txt",'w')
87
90
try:
88
 
    file("file_4.txt",'w').read()
 
91
    f.read()
89
92
    print "Test failed"
90
93
except Exception, e:
91
94
    print e
 
95
f.close()
92
96
 
93
97
print
94
98
print "Reading form append only files"
 
99
f = file("file_4.txt",'a')
95
100
try:
96
 
    file("file_4.txt",'a').read()
 
101
    f.read()
97
102
    print "Test failed"
98
103
except Exception, e:
99
104
    print e
 
105
f.close()