File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33from time import time
44import sys
55import stat
6- import copy
76
87from git .test .performance .lib import (
98 TestBigRepoR ,
Original file line number Diff line number Diff line change 33# This module is part of GitDB and is released under
44# the New BSD License: http://www.opensource.org/licenses/bsd-license.php
55"""Performance tests for object store"""
6- from lib import (
7- TestBigRepoR
6+ from git .test .performance .lib import (
7+ TestBigRepoR ,
8+ GlobalsItemDeletorMetaCls
89 )
910
1011from git .exc import UnsupportedOperation
11- from git .db .py .pack import PurePackedODB
1212
1313import sys
1414import os
1515from time import time
1616import random
1717
18- class TestPurePackedODBPerformance (TestBigRepoR ):
18+
19+ class PerfBaseDeletorMetaClass (GlobalsItemDeletorMetaCls ):
20+ ModuleToDelete = 'TestPurePackedODBPerformanceBase'
21+
22+ class TestPurePackedODBPerformanceBase (TestBigRepoR ):
23+ __metaclass__ = PerfBaseDeletorMetaClass
1924
2025 #{ Configuration
21- PackedODBCls = PurePackedODB
26+ PackedODBCls = None
2227 #} END configuration
2328
2429 @classmethod
2530 def setUpAll (cls ):
26- super (TestPurePackedODBPerformance , cls ).setUpAll ()
31+ super (TestPurePackedODBPerformanceBase , cls ).setUpAll ()
32+ if cls .PackedODBCls is None :
33+ raise AssertionError ("PackedODBCls must be set in subclass" )
34+ #END assert configuration
2735 cls .ropdb = cls .PackedODBCls (cls .rorepo .db_path ("pack" ))
2836
2937 def test_pack_random_access (self ):
Original file line number Diff line number Diff line change 1+ from packedodb_impl import TestPurePackedODBPerformanceBase
2+ from git .db .py .pack import PurePackedODB
3+
4+ class TestPurePackedODB (TestPurePackedODBPerformanceBase ):
5+ #{ Configuration
6+ PackedODBCls = PurePackedODB
7+ #} END configuration
You can’t perform that action at this time.
0 commit comments