~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_lock.py

  • Committer: Patch Queue Manager
  • Date: 2016-04-21 04:10:52 UTC
  • mfrom: (6616.1.1 fix-en-user-guide)
  • Revision ID: pqm@pqm.ubuntu.com-20160421041052-clcye7ns1qcl2n7w
(richard-wilbur) Ensure build of English use guide always uses English text
 even when user's locale specifies a different language. (Jelmer Vernooij)

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