dulwich.tests package

Tests for Dulwich.

class dulwich.tests.BlackboxTestCase(methodName='runTest')

Bases: dulwich.tests.TestCase

Blackbox testing.

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

bin_directories = ['/code/dulwich/bin', '/usr/bin', '/usr/local/bin']
bin_path(name)

Determine the full path of a binary.

Parameters

name – Name of the script

Returns: Full path

run_command(name, args)

Run a Dulwich command.

Parameters
  • name – Name of the command, as it exists in bin/

  • args – Arguments to the command

exception dulwich.tests.SkipTest

Bases: Exception

Raise this exception in a test to skip it.

Usually you can use TestCase.skipTest() or one of the skipping decorators instead of raising this directly.

class dulwich.tests.TestCase(methodName='runTest')

Bases: unittest.case.TestCase

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

setUp()

Hook method for setting up the test fixture before exercising it.

tearDown()

Hook method for deconstructing the test fixture after testing it.

dulwich.tests.expectedFailure(test_item)
dulwich.tests.skipIf(condition, reason)

Skip a test if the condition is true.

Subpackages

Submodules