Show More
@@ -421,7 +421,7 b' class ifiledatatests(basetestcase):' | |||||
421 | f.size(i) |
|
421 | f.size(i) | |
422 |
|
422 | |||
423 | self.assertEqual(f.revision(nullid), b'') |
|
423 | self.assertEqual(f.revision(nullid), b'') | |
424 |
self.assertEqual(f.r |
|
424 | self.assertEqual(f.rawdata(nullid), b'') | |
425 |
|
425 | |||
426 | with self.assertRaises(error.LookupError): |
|
426 | with self.assertRaises(error.LookupError): | |
427 | f.revision(b'\x01' * 20) |
|
427 | f.revision(b'\x01' * 20) | |
@@ -473,7 +473,7 b' class ifiledatatests(basetestcase):' | |||||
473 | f.size(1) |
|
473 | f.size(1) | |
474 |
|
474 | |||
475 | self.assertEqual(f.revision(node), fulltext) |
|
475 | self.assertEqual(f.revision(node), fulltext) | |
476 |
self.assertEqual(f.r |
|
476 | self.assertEqual(f.rawdata(node), fulltext) | |
477 |
|
477 | |||
478 | self.assertEqual(f.read(node), fulltext) |
|
478 | self.assertEqual(f.read(node), fulltext) | |
479 |
|
479 | |||
@@ -545,11 +545,11 b' class ifiledatatests(basetestcase):' | |||||
545 | f.size(3) |
|
545 | f.size(3) | |
546 |
|
546 | |||
547 | self.assertEqual(f.revision(node0), fulltext0) |
|
547 | self.assertEqual(f.revision(node0), fulltext0) | |
548 |
self.assertEqual(f.r |
|
548 | self.assertEqual(f.rawdata(node0), fulltext0) | |
549 | self.assertEqual(f.revision(node1), fulltext1) |
|
549 | self.assertEqual(f.revision(node1), fulltext1) | |
550 |
self.assertEqual(f.r |
|
550 | self.assertEqual(f.rawdata(node1), fulltext1) | |
551 | self.assertEqual(f.revision(node2), fulltext2) |
|
551 | self.assertEqual(f.revision(node2), fulltext2) | |
552 |
self.assertEqual(f.r |
|
552 | self.assertEqual(f.rawdata(node2), fulltext2) | |
553 |
|
553 | |||
554 | with self.assertRaises(error.LookupError): |
|
554 | with self.assertRaises(error.LookupError): | |
555 | f.revision(b'\x01' * 20) |
|
555 | f.revision(b'\x01' * 20) | |
@@ -819,9 +819,9 b' class ifiledatatests(basetestcase):' | |||||
819 | self.assertEqual(f.size(2), len(fulltext2)) |
|
819 | self.assertEqual(f.size(2), len(fulltext2)) | |
820 |
|
820 | |||
821 | self.assertEqual(f.revision(node1), stored1) |
|
821 | self.assertEqual(f.revision(node1), stored1) | |
822 |
self.assertEqual(f.r |
|
822 | self.assertEqual(f.rawdata(node1), stored1) | |
823 | self.assertEqual(f.revision(node2), stored2) |
|
823 | self.assertEqual(f.revision(node2), stored2) | |
824 |
self.assertEqual(f.r |
|
824 | self.assertEqual(f.rawdata(node2), stored2) | |
825 |
|
825 | |||
826 | self.assertEqual(f.read(node1), fulltext1) |
|
826 | self.assertEqual(f.read(node1), fulltext1) | |
827 | self.assertEqual(f.read(node2), fulltext2) |
|
827 | self.assertEqual(f.read(node2), fulltext2) | |
@@ -862,10 +862,10 b' class ifiledatatests(basetestcase):' | |||||
862 | self.assertEqual(f.size(1), len(fulltext1)) |
|
862 | self.assertEqual(f.size(1), len(fulltext1)) | |
863 |
|
863 | |||
864 | self.assertEqual(f.revision(node0), stored0) |
|
864 | self.assertEqual(f.revision(node0), stored0) | |
865 |
self.assertEqual(f.r |
|
865 | self.assertEqual(f.rawdata(node0), stored0) | |
866 |
|
866 | |||
867 | self.assertEqual(f.revision(node1), stored1) |
|
867 | self.assertEqual(f.revision(node1), stored1) | |
868 |
self.assertEqual(f.r |
|
868 | self.assertEqual(f.rawdata(node1), stored1) | |
869 |
|
869 | |||
870 | self.assertEqual(f.read(node0), fulltext0) |
|
870 | self.assertEqual(f.read(node0), fulltext0) | |
871 | self.assertEqual(f.read(node1), fulltext1) |
|
871 | self.assertEqual(f.read(node1), fulltext1) | |
@@ -896,10 +896,10 b' class ifiledatatests(basetestcase):' | |||||
896 | with self.assertRaises(error.StorageError): |
|
896 | with self.assertRaises(error.StorageError): | |
897 | f.revision(node1) |
|
897 | f.revision(node1) | |
898 |
|
898 | |||
899 |
# raw |
|
899 | # rawdata() still verifies because there are no special storage | |
900 | # settings. |
|
900 | # settings. | |
901 | with self.assertRaises(error.StorageError): |
|
901 | with self.assertRaises(error.StorageError): | |
902 |
f.r |
|
902 | f.rawdata(node1) | |
903 |
|
903 | |||
904 | # read() behaves like revision(). |
|
904 | # read() behaves like revision(). | |
905 | with self.assertRaises(error.StorageError): |
|
905 | with self.assertRaises(error.StorageError): | |
@@ -909,7 +909,7 b' class ifiledatatests(basetestcase):' | |||||
909 | # reading/validating the fulltext to return rename metadata. |
|
909 | # reading/validating the fulltext to return rename metadata. | |
910 |
|
910 | |||
911 | def testbadnoderevisionraw(self): |
|
911 | def testbadnoderevisionraw(self): | |
912 |
# Like above except we test r |
|
912 | # Like above except we test rawdata() first to isolate | |
913 | # revision caching behavior. |
|
913 | # revision caching behavior. | |
914 | f = self._makefilefn() |
|
914 | f = self._makefilefn() | |
915 |
|
915 | |||
@@ -924,10 +924,10 b' class ifiledatatests(basetestcase):' | |||||
924 | rawtext=fulltext1) |
|
924 | rawtext=fulltext1) | |
925 |
|
925 | |||
926 | with self.assertRaises(error.StorageError): |
|
926 | with self.assertRaises(error.StorageError): | |
927 |
f.r |
|
927 | f.rawdata(node1) | |
928 |
|
928 | |||
929 | with self.assertRaises(error.StorageError): |
|
929 | with self.assertRaises(error.StorageError): | |
930 |
f.r |
|
930 | f.rawdata(node1) | |
931 |
|
931 | |||
932 | def testbadnoderevisionraw(self): |
|
932 | def testbadnoderevisionraw(self): | |
933 | # Like above except we test read() first to isolate revision caching |
|
933 | # Like above except we test read() first to isolate revision caching | |
@@ -1002,13 +1002,13 b' class ifiledatatests(basetestcase):' | |||||
1002 | f.revision(1) |
|
1002 | f.revision(1) | |
1003 |
|
1003 | |||
1004 | with self.assertRaises(error.CensoredNodeError): |
|
1004 | with self.assertRaises(error.CensoredNodeError): | |
1005 |
f.r |
|
1005 | f.rawdata(1) | |
1006 |
|
1006 | |||
1007 | with self.assertRaises(error.CensoredNodeError): |
|
1007 | with self.assertRaises(error.CensoredNodeError): | |
1008 | f.read(1) |
|
1008 | f.read(1) | |
1009 |
|
1009 | |||
1010 | def testcensoredrawrevision(self): |
|
1010 | def testcensoredrawrevision(self): | |
1011 |
# Like above, except we do the r |
|
1011 | # Like above, except we do the rawdata() request first to | |
1012 | # isolate revision caching behavior. |
|
1012 | # isolate revision caching behavior. | |
1013 |
|
1013 | |||
1014 | f = self._makefilefn() |
|
1014 | f = self._makefilefn() | |
@@ -1027,7 +1027,7 b' class ifiledatatests(basetestcase):' | |||||
1027 | censored=True) |
|
1027 | censored=True) | |
1028 |
|
1028 | |||
1029 | with self.assertRaises(error.CensoredNodeError): |
|
1029 | with self.assertRaises(error.CensoredNodeError): | |
1030 |
f.r |
|
1030 | f.rawdata(1) | |
1031 |
|
1031 | |||
1032 | class ifilemutationtests(basetestcase): |
|
1032 | class ifilemutationtests(basetestcase): | |
1033 | """Generic tests for the ifilemutation interface. |
|
1033 | """Generic tests for the ifilemutation interface. |
General Comments 0
You need to be logged in to leave comments.
Login now