~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_lock.py

  • Committer: Richard Wilbur
  • Date: 2016-02-04 19:07:28 UTC
  • mto: This revision was merged to the branch mainline in revision 6618.
  • Revision ID: richard.wilbur@gmail.com-20160204190728-p0zvfii6zase0fw7
Update COPYING.txt from the original http://www.gnu.org/licenses/gpl-2.0.txt  (Only differences were in whitespace.)  Thanks to Petr Stodulka for pointing out the discrepancy.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2009 Canonical Ltd
 
1
# Copyright (C) 2009, 2011 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
17
17
"""Tests for OS Locks."""
18
18
 
19
19
 
20
 
 
21
20
from bzrlib import (
22
21
    debug,
23
22
    errors,
24
23
    lock,
25
24
    tests,
26
25
    )
27
 
 
28
 
 
29
 
def load_tests(standard_tests, module, loader):
30
 
    """Parameterize tests for all versions of groupcompress."""
31
 
    scenarios = []
32
 
    for name, write_lock, read_lock in lock._lock_classes:
33
 
        scenarios.append((name, {'write_lock': write_lock,
34
 
                                 'read_lock': read_lock}))
35
 
    suite = loader.suiteClass()
36
 
    result = tests.multiply_tests(standard_tests, scenarios, suite)
37
 
    return result
 
26
from bzrlib.tests.scenarios import load_tests_apply_scenarios
 
27
 
 
28
 
 
29
load_tests = load_tests_apply_scenarios
38
30
 
39
31
 
40
32
class TestOSLock(tests.TestCaseInTempDir):
41
33
 
42
 
    # Set by load_tests
 
34
    scenarios = [(
 
35
        name, {
 
36
            'write_lock': write_lock,
 
37
            'read_lock': read_lock})
 
38
        for name, write_lock, read_lock in lock._lock_classes]
 
39
 
43
40
    read_lock = None
44
41
    write_lock = None
45
42