dulwich.tests.test_refs module

Tests for dulwich.refs.

class dulwich.tests.test_refs.CheckRefFormatTests(methodName='runTest')

Bases: TestCase

Tests for the check_ref_format function.

These are the same tests as in the git test suite.

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.

test_invalid()
test_valid()
class dulwich.tests.test_refs.DictRefsContainerTests(methodName='runTest')

Bases: RefsContainerTests, 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.

test_invalid_refname()
class dulwich.tests.test_refs.DiskRefsContainerTests(methodName='runTest')

Bases: RefsContainerTests, 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.

test_add_if_new_packed()
test_add_if_new_symbolic()
test_cyrillic()
test_delete_refs_container()
test_delitem()
test_delitem_symbolic()
test_follow()
test_get_packed_refs()
test_get_peeled_not_packed()
test_non_ascii()
test_read_loose_ref()
test_read_ref()
test_remove_if_equals_packed()
test_remove_if_equals_symref()
test_remove_packed_without_peeled()
test_remove_parent()
test_set_if_equals()
test_set_overwrite_loop()
test_setitem()
test_setitem_packed()
test_setitem_symbolic()
class dulwich.tests.test_refs.InfoRefsContainerTests(methodName='runTest')

Bases: 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.

test_as_dict()
test_contains()
test_get_peeled()
test_invalid_refname()
test_keys()
class dulwich.tests.test_refs.PackedRefsFileTests(methodName='runTest')

Bases: 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.

test_read_with_peeled()
test_read_with_peeled_errors()
test_read_without_peeled()
test_read_without_peeled_errors()
test_split_ref_line_errors()
test_write_with_peeled()
test_write_without_peeled()
class dulwich.tests.test_refs.ParseSymrefValueTests(methodName='runTest')

Bases: 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.

test_invalid()
test_valid()
class dulwich.tests.test_refs.RefsContainerTests

Bases: object

test_add_if_new()
test_as_dict()
test_check_refname()
test_contains()
test_delitem()
test_get_symrefs()
test_import_refs_name()
test_import_refs_name_prune()
test_iter()
test_keys()
test_remove_if_equals()
test_set_if_equals()
test_set_symbolic_ref()
test_set_symbolic_ref_overwrite()
test_setitem()
class dulwich.tests.test_refs.StripPeeledRefsTests(methodName='runTest')

Bases: 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.

all_refs = {b'refs/heads/master': b'8843d7f92416211de9ebb963ff4ce28125932878', b'refs/heads/testing': b'186a005b134d8639a58b6731c7c1ea821a6eedba', b'refs/tags/1.0.0': b'a93db4b0360cc635a2b93675010bac8d101f73f0', b'refs/tags/1.0.0^{}': b'a93db4b0360cc635a2b93675010bac8d101f73f0', b'refs/tags/2.0.0': b'0749936d0956c661ac8f8d3483774509c165f89e', b'refs/tags/2.0.0^{}': b'0749936d0956c661ac8f8d3483774509c165f89e'}
non_peeled_refs = {b'refs/heads/master': b'8843d7f92416211de9ebb963ff4ce28125932878', b'refs/heads/testing': b'186a005b134d8639a58b6731c7c1ea821a6eedba', b'refs/tags/1.0.0': b'a93db4b0360cc635a2b93675010bac8d101f73f0', b'refs/tags/2.0.0': b'0749936d0956c661ac8f8d3483774509c165f89e'}
test_strip_peeled_refs()