Changeset 896 in tailor


Ignore:
Timestamp:
10/12/05 22:51:23 (8 years ago)
Author:
lele@…
Hash name:
20051012205123-97f81-523076b116f7f95ae7544655f4b49907ccee073c
Message:

Keep the test CVS logs in external files
This is controversial, but since the parser is picky on white spaces...

Location:
vcpx/tests
Files:
14 added
1 edited

Legend:

Unmodified
Added
Removed
  • vcpx/tests/cvs.py

    r882 r896  
    4444    """Ensure the cvs log parser does its job""" 
    4545 
    46     SIMPLE_TEST = u"""\ 
    47 cvs rlog: Logging docutils 
    48  
    49 RCS file: /cvsroot/docutils/docutils/THANKS.txt,v 
    50 head: 1.2 
    51 branch: 
    52 locks: strict 
    53 access list: 
    54 symbolic names: 
    55 keyword substitution: kv 
    56 total revisions: 2;      selected revisions: 2 
    57 description: 
    58 ---------------------------- 
    59 revision 1.2 
    60 date: 2004/06/10 02:17:20;  author: goodger;  state: Exp;  lines: +3 -2 
    61 *** empty log message *** 
    62 ---------------------------- 
    63 revision 1.1 
    64 date: 2004/06/03 13:50:58;  author: goodger;  state: Exp; 
    65 Added to project (exctracted from HISTORY.txt) 
    66 ============================================================================= 
    67 """ 
     46    def getCvsLog(self, testname): 
     47        from codecs import open 
     48        from os.path import join, split 
     49 
     50        logname = join(split(__file__)[0], 'data', testname)+'.log' 
     51        return open(logname, 'r', 'utf-8') 
    6852 
    6953    def testBasicBehaviour(self): 
    7054        """Verify basic cvs log parser behaviour""" 
    7155 
    72         log = StringIO(self.SIMPLE_TEST) 
     56        log = self.getCvsLog('cvs-simple_test') 
    7357        csets = changesets_from_cvslog(log, 'docutils') 
    7458 
     
    9478        self.assertEqual(entry.action_kind, entry.UPDATED) 
    9579 
    96     DOUBLE_TEST = u"""\ 
    97 cvs rlog: Logging docutils/docutils 
    98  
    99 RCS file: /cvsroot/docutils/docutils/docutils/statemachine.py,v 
    100 head: 1.16 
    101 branch: 
    102 locks: strict 
    103 access list: 
    104 symbolic names: 
    105         nesting: 1.15.0.2 
    106         start: 1.1.1.1 
    107         goodger: 1.1.1 
    108 keyword substitution: kv 
    109 total revisions: 17;    selected revisions: 1 
    110 description: 
    111 ---------------------------- 
    112 revision 1.16 
    113 date: 2004/06/17 21:46:50;  author: goodger;  state: Exp;  lines: +6 -2 
    114 support for CSV directive implementation 
    115 ============================================================================= 
    116  
    117 RCS file: /cvsroot/docutils/docutils/docutils/utils.py,v 
    118 head: 1.35 
    119 branch: 
    120 locks: strict 
    121 access list: 
    122 symbolic names: 
    123         nesting: 1.29.0.2 
    124         start: 1.1.1.1 
    125         goodger: 1.1.1 
    126 keyword substitution: kv 
    127 total revisions: 36;    selected revisions: 5 
    128 description: 
    129 ---------------------------- 
    130 revision 1.35 
    131 date: 2004/06/20 16:03:17;  author: felixwiemann;  state: Exp;  lines: +12 -6 
    132 make warning_stream work 
    133 ---------------------------- 
    134 revision 1.34 
    135 date: 2004/06/17 21:46:50;  author: goodger;  state: Exp;  lines: +5 -2 
    136 support for CSV directive implementation 
    137 ---------------------------- 
    138 revision 1.33 
    139 date: 2004/06/17 02:51:31;  author: goodger;  state: Exp;  lines: +4 -2 
    140 docstrings 
    141 ---------------------------- 
    142 revision 1.32 
    143 date: 2004/06/17 02:08:48;  author: goodger;  state: Exp;  lines: +4 -2 
    144 docstrings 
    145 ---------------------------- 
    146 revision 1.31 
    147 date: 2004/04/27 19:51:07;  author: goodger;  state: Exp;  lines: +5 -3 
    148 updated 
    149 ============================================================================= 
    150 """ 
    151  
    15280    def testGroupingCapability(self): 
    15381        """Verify cvs log parser grouping capability""" 
    15482 
    155         log = StringIO(self.DOUBLE_TEST) 
     83        log = self.getCvsLog('cvs-double_test') 
    15684        csets = changesets_from_cvslog(log, 'docutils') 
    15785 
     
    188116        self.assertEqual(cset.date, datetime(2004, 6, 20, 16, 3, 17)) 
    189117 
    190     DELETED_TEST = u"""\ 
    191 cvs rlog: Logging docutils 
    192  
    193 RCS file: /cvsroot/docutils/docutils/Attic/THANKS.txt,v 
    194 head: 1.2 
    195 branch: 
    196 locks: strict 
    197 access list: 
    198 symbolic names: 
    199 keyword substitution: kv 
    200 total revisions: 2;      selected revisions: 2 
    201 description: 
    202 ---------------------------- 
    203 revision 1.2 
    204 date: 2004/06/10 02:17:20;  author: goodger;  state: dead;  lines: +3 -2 
    205 updated 
    206 ---------------------------- 
    207 revision 1.1 
    208 date: 2004/06/03 13:50:58;  author: goodger;  state: Exp; 
    209 Added to project (exctracted from HISTORY.txt) 
    210 ============================================================================= 
    211 """ 
    212  
    213118    def testDeletedEntry(self): 
    214119        """Verify recognition of deleted entries in the cvs log""" 
    215120 
    216         log = StringIO(self.DELETED_TEST) 
     121        log = self.getCvsLog('cvs-deleted_test') 
    217122        csets = changesets_from_cvslog(log, 'docutils') 
    218123 
     
    228133        self.assertEqual(entry.action_kind, entry.DELETED) 
    229134 
    230     COLLAPSE_TEST = u"""\ 
    231 cvs rlog: Logging PyObjC/Doc 
    232  
    233 RCS file: /usr/local/CVSROOT/PyObjC/Doc/libObjCStreams.tex,v 
    234 head: 1.4 
    235 branch: 
    236 locks: strict 
    237 access list: 
    238 keyword substitution: kv 
    239 total revisions: 4;     selected revisions: 4 
    240 description: 
    241 ---------------------------- 
    242 revision 1.4 
    243 date: 1997-12-21 23:01:28;  author: lele;  state: Exp;  lines: +2 -8 
    244 Fake changelog 1 
    245 ---------------------------- 
    246 revision 1.3 
    247 date: 1996-10-18 13:48:36;  author: lele;  state: Exp;  lines: +10 -3 
    248 Fake changelog 2 
    249 ---------------------------- 
    250 revision 1.2 
    251 date: 1996-10-14 13:56:50;  author: lele;  state: Exp;  lines: +11 -19 
    252 Fake changelog 3 
    253 ---------------------------- 
    254 revision 1.1 
    255 date: 1996-10-07 18:32:11;  author: lele;  state: Exp; 
    256 Fake changelog 4 
    257 ============================================================================= 
    258  
    259 RCS file: /usr/local/CVSROOT/PyObjC/Doc/libPyObjC.tex,v 
    260 head: 1.4 
    261 branch: 
    262 locks: strict 
    263 access list: 
    264 keyword substitution: kv 
    265 total revisions: 4;     selected revisions: 4 
    266 description: 
    267 ---------------------------- 
    268 revision 1.4 
    269 date: 1997-12-21 23:01:29;  author: lele;  state: Exp;  lines: +2 -8 
    270 Fake changelog 1 
    271 ---------------------------- 
    272 revision 1.3 
    273 date: 1996-10-18 13:48:45;  author: lele;  state: Exp;  lines: +7 -2 
    274 Fake changelog 2 
    275 ---------------------------- 
    276 revision 1.2 
    277 date: 1996-10-18 12:36:04;  author: lele;  state: Exp;  lines: +7 -3 
    278 Fake changelog 3 
    279 ---------------------------- 
    280 revision 1.1 
    281 date: 1996-10-07 18:32:12;  author: lele;  state: Exp; 
    282 Fake changelog 4 
    283 ============================================================================= 
    284 """ 
    285  
    286135    def testCollapsedChangeset(self): 
    287136        """Verify the mechanism used to collapse related changesets""" 
    288137 
    289         log = StringIO(self.COLLAPSE_TEST) 
     138        log = self.getCvsLog('cvs-collapse_test') 
    290139        csets = changesets_from_cvslog(log, 'PyObjC') 
    291140 
     
    312161        self.assertEqual(cset.date, datetime(1996, 10, 18, 13, 48, 45)) 
    313162 
    314     BRANCHES_TEST = u"""\ 
    315 cvs rlog: Logging Archetypes/tests 
    316  
    317 RCS file: /cvsroot/archetypes/Archetypes/tests/test_classgen.py,v 
    318 head: 1.18 
    319 branch: 
    320 locks: strict 
    321 access list: 
    322 keyword substitution: kv 
    323 total revisions: 34;    selected revisions: 3 
    324 description: 
    325 ---------------------------- 
    326 revision 1.18.14.5 
    327 date: 2004/06/17 19:08:43;  author: tiran;  state: Exp;  lines: +1 -0 
    328 new test for setFormat/setContentType, content_type as computed attribute 
    329 ---------------------------- 
    330 revision 1.18.14.4 
    331 date: 2004/05/24 11:20:57;  author: tiran;  state: Exp;  lines: +11 -1 
    332 Merge from tiran-seperate_mtr-branch 
    333 ---------------------------- 
    334 revision 1.18.14.3 
    335 date: 2004/05/21 18:08:46;  author: tiran;  state: Exp;  lines: +1 -3 
    336 branches:  1.18.14.3.2; 
    337 Fixed deepcopy problem in validations 
    338 ============================================================================= 
    339 """ 
    340  
    341163    def testBranchesInLog(self): 
    342164        """Verify the parser groks with the branches info on revision""" 
    343165 
    344         log = StringIO(self.BRANCHES_TEST) 
     166        log = self.getCvsLog('cvs-branches_test') 
    345167        csets = changesets_from_cvslog(log, 'Archetypes') 
    346168 
     
    349171        cset = csets[0] 
    350172        self.assertEqual(cset.log,"Fixed deepcopy problem in validations") 
    351  
    352     REPOSPATH_TEST = u"""\ 
    353 cvs rlog: Logging Zope/spurious/dummy/dir 
    354 cvs rlog: Logging Zope/lib/python/DateTime 
    355 cvs rlog: warning: no revision `Zope-2_7-branch' in `/cvs-repository/Packages/DateTime/Attic/DateTime.html,v' 
    356  
    357 RCS file: /cvs-repository/Packages/DateTime/Attic/DateTime.py,v 
    358 head: 1.100 
    359 branch: 
    360 locks: strict 
    361 access list: 
    362 keyword substitution: kv 
    363 total revisions: 170;   selected revisions: 1 
    364 description: 
    365 ---------------------------- 
    366 revision 1.85.12.11 
    367 date: 2004/08/02 09:49:18;  author: andreasjung;  state: Exp;  lines: +22 -2 
    368 backported copy constructor from trunk 
    369 ============================================================================= 
    370 """ 
    371173 
    372174    def testReposPath(self): 
    373175        """Verify the parser is right in determine working copy file paths""" 
    374176 
    375         log = StringIO(self.REPOSPATH_TEST) 
     177        log = self.getCvsLog('cvs-repospath_test') 
    376178        csets = changesets_from_cvslog(log, 'Zope') 
    377179 
     
    384186        self.assertEqual(entry.name, 'lib/python/DateTime/DateTime.py') 
    385187 
    386     LONGLOG_TEST = u"""\ 
    387 cvs rlog: Logging ATContentTypes 
    388  
    389 RCS file: /cvsroot/collective/ATContentTypes/Attic/ConstrainTypesMixin.py,v 
    390 head: 1.1 
    391 branch: 
    392 locks: strict 
    393 access list: 
    394 keyword substitution: kv 
    395 total revisions: 5;     selected revisions: 1 
    396 description: 
    397 ---------------------------- 
    398 revision 1.1 
    399 date: 2004/08/11 01:09:46;  author: rochael;  state: dead; 
    400 branches:  1.1.2; 
    401 file ConstrainTypesMixin.py was initially added on branch jensens-restrain_mixin-branch. 
    402 ============================================================================= 
    403  
    404 RCS file: /cvsroot/collective/ATContentTypes/customconfig.py.example,v 
    405 head: 1.7 
    406 branch: 
    407 locks: strict 
    408 access list: 
    409 keyword substitution: kv 
    410 total revisions: 9;     selected revisions: 1 
    411 description: 
    412 ---------------------------- 
    413 revision 1.7 
    414 date: 2004/08/13 13:59:55;  author: rochael;  state: Exp;  lines: +1 -5 
    415 removed duplicated ENABLE_TEMPLATE_MIXIN 
    416 ============================================================================= 
    417 cvs rlog: Logging ATContentTypes/Extensions 
    418  
    419 RCS file: /cvsroot/collective/ATContentTypes/Extensions/batchCreate.py,v 
    420 head: 1.2 
    421 branch: 
    422 locks: strict 
    423 access list: 
    424 keyword substitution: kv 
    425 total revisions: 3;     selected revisions: 1 
    426 description: 
    427 ---------------------------- 
    428 revision 1.2 
    429 date: 2004/08/09 07:44:05;  author: tiran;  state: Exp;  lines: +4 -1 
    430 branches:  1.2.2; 
    431 Recoded migration walkers to use a generator instead returning a list to make them much more memory efficient. 
    432  
    433 Rewritten folder migration to use the depth inside the folder structur instead of recursing into the full side. 
    434  
    435 Added a findStaledObjects external method to ATCT to find staled objects. It is very useful to clean up a site before running the migration. 
    436 ============================================================================= 
    437  
    438 RCS file: /cvsroot/collective/ATContentTypes/Extensions/findStaledObjects.py,v 
    439 head: 1.1 
    440 branch: 
    441 locks: strict 
    442 access list: 
    443 keyword substitution: kv 
    444 total revisions: 2;     selected revisions: 1 
    445 description: 
    446 ---------------------------- 
    447 revision 1.1 
    448 date: 2004/08/09 07:44:05;  author: tiran;  state: Exp; 
    449 branches:  1.1.2; 
    450 Recoded migration walkers to use a generator instead returning a list to make them much more memory efficient. 
    451  
    452 Rewritten folder migration to use the depth inside the folder structur instead of recursing into the full side. 
    453  
    454 Added a findStaledObjects external method to ATCT to find staled objects. It is very useful to clean up a site before running the migration. 
    455 ============================================================================= 
    456 cvs rlog: Logging ATContentTypes/debian 
    457 cvs rlog: Logging ATContentTypes/docs 
    458  
    459 RCS file: /cvsroot/collective/ATContentTypes/docs/ExtendingType.txt,v 
    460 head: 1.1 
    461 branch: 
    462 locks: strict 
    463 access list: 
    464 keyword substitution: kv 
    465 total revisions: 2;     selected revisions: 1 
    466 description: 
    467 ---------------------------- 
    468 revision 1.1 
    469 date: 2004/08/06 20:13:30;  author: tiran;  state: Exp; 
    470 branches:  1.1.2; 
    471 Added ExtendingType 
    472 ============================================================================= 
    473  
    474 RCS file: /cvsroot/collective/ATContentTypes/docs/HISTORY.txt,v 
    475 head: 1.42 
    476 branch: 
    477 locks: strict 
    478 access list: 
    479 keyword substitution: kv 
    480 total revisions: 44;    selected revisions: 1 
    481 description: 
    482 ---------------------------- 
    483 revision 1.42 
    484 date: 2004/08/09 07:44:07;  author: tiran;  state: Exp;  lines: +12 -0 
    485 Recoded migration walkers to use a generator instead returning a list to make them much more memory efficient. 
    486  
    487 Rewritten folder migration to use the depth inside the folder structur instead of recursing into the full side. 
    488  
    489 Added a findStaledObjects external method to ATCT to find staled objects. It is very useful to clean up a site before running the migration. 
    490 ============================================================================= 
    491 cvs rlog: Logging ATContentTypes/i18n 
    492 cvs rlog: Logging ATContentTypes/interfaces 
    493  
    494 RCS file: /cvsroot/collective/ATContentTypes/interfaces/Attic/IConstrainTypes.py,v 
    495 head: 1.1 
    496 branch: 
    497 locks: strict 
    498 access list: 
    499 keyword substitution: kv 
    500 total revisions: 2;     selected revisions: 1 
    501 description: 
    502 ---------------------------- 
    503 revision 1.1 
    504 date: 2004/08/11 01:09:47;  author: rochael;  state: dead; 
    505 branches:  1.1.2; 
    506 file IConstrainTypes.py was initially added on branch jensens-restrain_mixin-branch. 
    507 ============================================================================= 
    508 cvs rlog: Logging ATContentTypes/migration 
    509  
    510 RCS file: /cvsroot/collective/ATContentTypes/migration/ATCTMigrator.py,v 
    511 head: 1.12 
    512 branch: 
    513 locks: strict 
    514 access list: 
    515 keyword substitution: kv 
    516 total revisions: 14;    selected revisions: 1 
    517 description: 
    518 ---------------------------- 
    519 revision 1.12 
    520 date: 2004/08/09 07:44:09;  author: tiran;  state: Exp;  lines: +42 -32 
    521 Recoded migration walkers to use a generator instead returning a list to make them much more memory efficient. 
    522  
    523 Rewritten folder migration to use the depth inside the folder structur instead of recursing into the full side. 
    524  
    525 Added a findStaledObjects external method to ATCT to find staled objects. It is very useful to clean up a site before running the migration. 
    526 ============================================================================= 
    527  
    528 RCS file: /cvsroot/collective/ATContentTypes/migration/CPTMigrator.py,v 
    529 head: 1.8 
    530 branch: 
    531 locks: strict 
    532 access list: 
    533 keyword substitution: kv 
    534 total revisions: 9;     selected revisions: 1 
    535 description: 
    536 ---------------------------- 
    537 revision 1.8 
    538 date: 2004/08/09 07:44:09;  author: tiran;  state: Exp;  lines: +38 -31 
    539 Recoded migration walkers to use a generator instead returning a list to make them much more memory efficient. 
    540  
    541 Rewritten folder migration to use the depth inside the folder structur instead of recursing into the full side. 
    542  
    543 Added a findStaledObjects external method to ATCT to find staled objects. It is very useful to clean up a site before running the migration. 
    544 ============================================================================= 
    545  
    546 RCS file: /cvsroot/collective/ATContentTypes/migration/Walker.py,v 
    547 head: 1.15 
    548 branch: 
    549 locks: strict 
    550 access list: 
    551 keyword substitution: kv 
    552 total revisions: 17;    selected revisions: 1 
    553 description: 
    554 ---------------------------- 
    555 revision 1.15 
    556 date: 2004/08/09 07:44:09;  author: tiran;  state: Exp;  lines: +76 -30 
    557 Recoded migration walkers to use a generator instead returning a list to make them much more memory efficient. 
    558  
    559 Rewritten folder migration to use the depth inside the folder structur instead of recursing into the full side. 
    560  
    561 Added a findStaledObjects external method to ATCT to find staled objects. It is very useful to clean up a site before running the migration. 
    562 ============================================================================= 
    563 cvs rlog: Logging ATContentTypes/skins 
    564 cvs rlog: Logging ATContentTypes/skins/ATContentTypes 
    565  
    566 RCS file: /cvsroot/collective/ATContentTypes/skins/ATContentTypes/atct_history.pt,v 
    567 head: 1.5 
    568 branch: 
    569 locks: strict 
    570 access list: 
    571 keyword substitution: kv 
    572 total revisions: 7;     selected revisions: 1 
    573 description: 
    574 ---------------------------- 
    575 revision 1.5 
    576 date: 2004/08/13 13:21:53;  author: tiran;  state: Exp;  lines: +1 -2 
    577 Somehow I mixed up two sentences 
    578 ============================================================================= 
    579 cvs rlog: Logging ATContentTypes/tests 
    580  
    581 RCS file: /cvsroot/collective/ATContentTypes/tests/Attic/testContrainTypes.py,v 
    582 head: 1.1 
    583 branch: 
    584 locks: strict 
    585 access list: 
    586 keyword substitution: kv 
    587 total revisions: 4;     selected revisions: 1 
    588 description: 
    589 ---------------------------- 
    590 revision 1.1 
    591 date: 2004/08/11 01:13:43;  author: rochael;  state: dead; 
    592 branches:  1.1.2; 
    593 file testContrainTypes.py was initially added on branch jensens-restrain_mixin-branch. 
    594 ============================================================================= 
    595 cvs rlog: Logging ATContentTypes/types 
    596  
    597 RCS file: /cvsroot/collective/ATContentTypes/types/ATContentType.py,v 
    598 head: 1.36 
    599 branch: 
    600 locks: strict 
    601 access list: 
    602 keyword substitution: kv 
    603 total revisions: 38;    selected revisions: 1 
    604 description: 
    605 ---------------------------- 
    606 revision 1.36 
    607 date: 2004/08/13 13:15:46;  author: tiran;  state: Exp;  lines: +2 -2 
    608 Fixed typo 
    609 ============================================================================= 
    610  
    611 RCS file: /cvsroot/collective/ATContentTypes/types/schemata.py,v 
    612 head: 1.45 
    613 branch: 
    614 locks: strict 
    615 access list: 
    616 keyword substitution: kv 
    617 total revisions: 49;    selected revisions: 1 
    618 description: 
    619 ---------------------------- 
    620 revision 1.45 
    621 date: 2004/08/13 13:21:24;  author: tiran;  state: Exp;  lines: +24 -24 
    622 Something went wrong ... 
    623 ============================================================================= 
    624 cvs rlog: Logging ATContentTypes/types/criteria 
    625 """ 
    626  
    627188    def testLongLog(self): 
    628189        """Stress the parser with a very long changelog""" 
    629190 
    630         log = StringIO(self.LONGLOG_TEST) 
     191        log = self.getCvsLog('cvs-longlog_test') 
    631192        csets = changesets_from_cvslog(log, 'ATContentTypes') 
    632193 
     
    692253                          changesets_from_cvslog, log, 'docutils') 
    693254 
    694     CREATED_IN_BRANCH_TEST = u"""\ 
    695 cvs rlog: Logging dsssl-utils/bigdiesel/src 
    696  
    697 RCS file: /cvsroot/dsssl-utils/dsssl-utils/bigdiesel/src/tokenizer-rgc-test.scm,v 
    698 head: 1.2 
    699 branch: 
    700 locks: strict 
    701 access list: 
    702 keyword substitution: kv 
    703 total revisions: 3;     selected revisions: 2 
    704 description: 
    705 ---------------------------- 
    706 revision 1.2 
    707 date: 2002/07/30 12:38:24;  author: ydirson;  state: Exp;  lines: +36 -0 
    708 merged until bigloo-parser_trunk-merge_2: new tokenizer, basic attributes support 
    709 ---------------------------- 
    710 revision 1.1 
    711 date: 2002/07/27 16:28:23;  author: ydirson;  state: dead; 
    712 branches:  1.1.2; 
    713 file tokenizer-rgc-test.scm was initially added on branch bigloo-parser. 
    714 ============================================================================= 
    715 """ 
    716  
    717255    def testInitialCreationOnBranchBehaviour(self): 
    718256        """Verify cvs log parser skip spurious entries""" 
    719257 
    720         log = StringIO(self.CREATED_IN_BRANCH_TEST) 
     258        log = self.getCvsLog('cvs-created_in_branch_test') 
    721259        csets = changesets_from_cvslog(log, 'dsssl-utils') 
    722260 
    723261        self.assertEqual(len(csets), 1) 
    724  
    725     DESCRIPTION_TEST = u"""\ 
    726 cvs rlog: Logging Zope 
    727  
    728 RCS file: /cvs-repository/Packages/ZServer/Attic/start_medusa.py,v 
    729 head: 1.3 
    730 branch: 
    731 locks: strict 
    732 access list: 
    733 keyword substitution: kv 
    734 total revisions: 3;     selected revisions: 0 
    735 description: 
    736 ============================================================================= 
    737 cvs rlog: warning: no revision `Zope-2_7-branch' in `/cvs-repository/Packages/ZServer/Attic/zinit.py,v' 
    738  
    739 RCS file: /cvs-repository/Packages/ZServer/Attic/zinit.py,v 
    740 head: 1.5 
    741 branch: 
    742 locks: strict 
    743 access list: 
    744 keyword substitution: kv 
    745 total revisions: 5;     selected revisions: 0 
    746 description: 
    747 Persistent server script 
    748 ============================================================================= 
    749 cvs rlog: warning: no revision `Zope-2_7-branch' in `/cvs-repository/Packages/ZServer/Attic/zope_handler.py,v' 
    750 """ 
    751262 
    752263    def testDescriptionPresent(self): 
    753264        """Verify cvs log parser handle eventual description""" 
    754265 
    755         log = StringIO(self.DESCRIPTION_TEST) 
     266        log = self.getCvsLog('cvs-description_test') 
    756267        csets = changesets_from_cvslog(log, 'zope') 
    757  
    758     ADD_DEL_ADD_AGAIN_TEST = u"""\ 
    759 cvs rlog: Logging test 
    760  
    761 RCS file: /tmp/t/test-repo/test/file,v 
    762 head: 1.6 
    763 branch: 
    764 locks: strict 
    765 access list: 
    766 keyword substitution: kv 
    767 total revisions: 6;     selected revisions: 6 
    768 description: 
    769 ---------------------------- 
    770 revision 1.6 
    771 date: 2004-07-27 19:26:13 +0000;  author: mdlavin;  state: Exp;  lines: +2 -1 
    772 *** empty log message *** 
    773 ---------------------------- 
    774 revision 1.5 
    775 date: 2004-03-31 21:56:41 +0000;  author: mdlavin;  state: Exp;  lines: +1 -2 
    776 Remove generated header files from CVS 
    777 ---------------------------- 
    778 revision 1.4 
    779 date: 2004-03-31 21:51:08 +0000;  author: mdlavin;  state: Exp;  lines: +2 -1 
    780 *** empty log message *** 
    781 ---------------------------- 
    782 revision 1.3 
    783 date: 2004-03-23 19:24:21 +0000;  author: mdlavin;  state: Exp;  lines: +1 -1 
    784 *** empty log message *** 
    785 ---------------------------- 
    786 revision 1.2 
    787 date: 2004-03-23 19:22:13 +0000;  author: mdlavin;  state: dead;  lines: +0 -0 
    788 *** empty log message *** 
    789 ---------------------------- 
    790 revision 1.1 
    791 date: 2004-03-23 19:20:02 +0000;  author: mdlavin;  state: Exp; 
    792 *** empty log message *** 
    793 ============================================================================= 
    794 """ 
    795268 
    796269    def testAddDelAddAgain(self): 
    797270        """Verify add->delete->add/modify->modify CVS case""" 
    798271 
    799         log = StringIO(self.ADD_DEL_ADD_AGAIN_TEST) 
     272        log = self.getCvsLog('cvs-add_del_add_again_test') 
    800273        csets = changesets_from_cvslog(log, 'test') 
    801274 
     
    820293        self.assertEqual(entry.action_kind, entry.ADDED) 
    821294 
    822     MULTI_MODULE_TEST = u"""\ 
    823 cvs rlog: Logging apache-1.3/src/test/vhtest/logs 
    824  
    825 RCS file: /home/cvspublic/apache-1.3/src/test/vhtest/logs/.cvsignore,v 
    826 head: 1.1 
    827 branch: 
    828 locks: strict 
    829 access list: 
    830 keyword substitution: kv 
    831 total revisions: 1;     selected revisions: 1 
    832 description: 
    833 ---------------------------- 
    834 revision 1.1 
    835 date: 1998/02/08 22:50:19;  author: dgaudet;  state: Exp; 
    836 tweak tweak, docs were slightly wrong 
    837 ============================================================================= 
    838 cvs rlog: Logging httpd-docs-1.3/htdocs 
    839  
    840 RCS file: /home/cvspublic/httpd-docs-1.3/htdocs/Attic/.cvsignore,v 
    841 head: 1.2 
    842 branch: 
    843 locks: strict 
    844 access list: 
    845 keyword substitution: kv 
    846 total revisions: 2;     selected revisions: 2 
    847 description: 
    848 ---------------------------- 
    849 revision 1.2 
    850 date: 1999/08/28 01:11:49;  author: fielding;  state: dead;  lines: +0 -0 
    851 Don't ignore everything when everything isn't supposed to be ignored. 
    852 If this bugs configure users, then fix configure so that it uses a 
    853 distinctive prefix that won't match Makefile.tmpl. 
    854  
    855 Submitted by:   Roy Fielding, Sander van Zoest 
    856 ---------------------------- 
    857 revision 1.1 
    858 date: 1997/12/21 00:22:00;  author: dgaudet;  state: Exp; 
    859 I'm tired of cvs complaining about all my debugging files.  We're not likely 
    860 to be changing this directory much, so ignore any non-cvs files in it. 
    861 """ 
    862  
    863295    def testModules(self): 
    864296        """Verify the parser correctly handle multimodules""" 
    865297 
    866         log = StringIO(self.MULTI_MODULE_TEST) 
     298        log = self.getCvsLog('cvs-multi_module_test') 
    867299        csets = changesets_from_cvslog(log, 'apache-1.3') 
    868  
    869     ENTRY_NAMES_TEST = u""" 
    870 cvs rlog: Logging Products/PluggableAuthService 
    871  
    872 RCS file: /cvs-repository/Products/PluggableAuthService/COPYRIGHT.txt,v 
    873 head: 1.1 
    874 branch: 
    875 locks: strict 
    876 access list: 
    877 keyword substitution: kv 
    878 total revisions: 1;     selected revisions: 1 
    879 description: 
    880 ---------------------------- 
    881 revision 1.1 
    882 date: 2004/08/12 15:15:53;  author: jens;  state: Exp; 
    883 Sorry for the noise - switching to ZPL 2.1 
    884 ============================================================================= 
    885 """ 
    886300 
    887301    def testEntryNames(self): 
    888302        """Verify the parser removes module name from entries""" 
    889303 
    890         log = StringIO(self.ENTRY_NAMES_TEST) 
     304        log = self.getCvsLog('cvs-entry_names_test') 
    891305        csets = changesets_from_cvslog(log, 'Products/PluggableAuthService') 
    892306 
     
    895309        self.assertEqual(entry.name, 'COPYRIGHT.txt') 
    896310 
    897     ENCODING_TEST = u""" 
    898 cvs rlog: Logging pxlib/src 
    899  
    900 RCS file: /cvsroot/pxlib/pxlib/src/px_head.h,v 
    901 head: 1.8 
    902 branch: 
    903 locks: strict 
    904 access list: 
    905 keyword substitution: kv 
    906 total revisions: 9;     selected revisions: 2 
    907 description: 
    908 ---------------------------- 
    909 revision 1.8 
    910 date: 2005/08/17 16:07:40;  author: steinm;  state: Exp;  lines: +1 -0 
    911 - added prototype for px_delete_data_from_block() 
    912 ---------------------------- 
    913 revision 1.7 
    914 date: 2005/08/17 05:16:24;  author: steinm;  state: Exp;  lines: +1 -1 
    915 ­ new prototype for px_add_data_to_block() 
    916 ============================================================================= 
    917 """ 
    918311    def testUnicode(self): 
    919312        """Verify cvs parser returns unicode strings""" 
    920313 
    921         log = StringIO(self.ENCODING_TEST) 
     314        log = self.getCvsLog('cvs-encoding_test') 
    922315        csets = changesets_from_cvslog(log, 'pxlib') 
    923316 
     
    930323        self.assertEqual(len(log.encode('ascii', 'ignore')), 41) 
    931324 
    932     DOUBLE_DEAD_TEST = """\ 
    933 cvs rlog: Logging composestar/temp/ComposestarVSAddin/ComposestarVSAddin 
    934  
    935 RCS file: /cvsroot/composestar/composestar/temp/ComposestarVSAddin/Attic/Ini.cs,v 
    936 head: 1.3 
    937 branch: 
    938 locks: strict 
    939 access list: 
    940 keyword substitution: kv 
    941 total revisions: 3;     selected revisions: 3 
    942 description: 
    943 ---------------------------- 
    944 revision 1.3 
    945 date: 2004/07/15 08:28:02;  author: sverre_boschman;  state: dead;  lines: +0 -0 
    946 *** empty log message *** 
    947 ---------------------------- 
    948 revision 1.2 
    949 date: 2004/07/15 08:28:02;  author: sverre_boschman;  state: dead;  lines: +0 -0 
    950 *** empty log message *** 
    951 ---------------------------- 
    952 revision 1.1 
    953 date: 2004/07/14 15:39:55;  author: sverre_boschman;  state: Exp; 
    954 Backup 
    955 ============================================================================= 
    956  
    957 RCS file: /cvsroot/composestar/composestar/temp/ComposestarVSAddin/ConfigManager/Attic/ConfigManager.cs,v 
    958 head: 1.3 
    959 branch: 
    960 locks: strict 
    961 access list: 
    962 keyword substitution: kv 
    963 total revisions: 3;     selected revisions: 3 
    964 description: 
    965 ---------------------------- 
    966 revision 1.3 
    967 date: 2004/07/15 08:28:03;  author: sverre_boschman;  state: dead;  lines: +0 -0 
    968 *** empty log message *** 
    969 ---------------------------- 
    970 revision 1.2 
    971 date: 2004/07/15 08:28:02;  author: sverre_boschman;  state: dead;  lines: +0 -0 
    972 *** empty log message *** 
    973 ---------------------------- 
    974 revision 1.1 
    975 date: 2004/07/14 15:39:55;  author: sverre_boschman;  state: Exp; 
    976 Backup 
    977 ============================================================================= 
    978 """ 
    979  
    980325    def testDoubleDead(self): 
    981326        """Verify the parser collapse multiple deletions on a single entry""" 
    982327 
    983         log = StringIO(self.DOUBLE_DEAD_TEST) 
     328        log = self.getCvsLog('cvs-double_dead_test') 
    984329        csets = changesets_from_cvslog(log, 
    985330                                       'composestar/temp/ComposestarVSAddin') 
     
    1008353        self.assertEqual(entry.new_revision, '1.3') 
    1009354        self.assertEqual(entry.action_kind, entry.DELETED) 
    1010  
Note: See TracChangeset for help on using the changeset viewer.