-=[ Mr. Bumblebee ]=-
_Indonesia_

Path : /usr/lib/python2.7/dist-packages/bzrlib/plugins/changelog_merge/tests/
File Upload :
Current File : //usr/lib/python2.7/dist-packages/bzrlib/plugins/changelog_merge/tests/test_changelog_merge.pyc


u_Oc@sddlmZmZddlmZddlmZdddgZdddddgZd	dd
dgZ	dddgZ
ddddgZd	ddgZdej
fd
YZdejfdYZdS(i(tmergettests(ttest_merge_core(tchangelog_merges
Base entry B1s
Base entry B2s
Base entry B3s
This entry T1s
This entry T2sOther entry O1sBase entry B2 updatedsBase entry B1 edittTestMergeCoreLogiccBs5eZdZdZdZdZdZRS(cCsSdg}ddg}ddg}tj|||}|jdddg|dS(s&Changes at the top of 'other' float to the top.

        Given a changelog in THIS containing::

          NEW-1
          OLD-1

        and a changelog in OTHER containing::

          NEW-2
          OLD-1

        it will merge as::

          NEW-2
          NEW-1
          OLD-1
        sOLD-1sNEW-1sNEW-2N(Rt
merge_entriestassertEqual(tselftbase_entriestthis_entriest
other_entriestresult_entries((s]/usr/lib/python2.7/dist-packages/bzrlib/plugins/changelog_merge/tests/test_changelog_merge.pyttest_new_in_other_floats_to_topIs	cCsAtjttt}|jddddddgt|dS(sMerging a branch that:

         1. adds a new entry, and
         2. edits an old entry (e.g. to fix a typo or twiddle formatting)

        will:

         1. add the new entry to the top
         2. keep the edit, without duplicating the edited entry or moving it.
        sOther entry O1s
This entry T1s
This entry T2s
Base entry B1sBase entry B2 updateds
Base entry B3N(RRtsample_base_entriestsample_this_entriestsample_other_entriesRtlist(RR((s]/usr/lib/python2.7/dist-packages/bzrlib/plugins/changelog_merge/tests/test_changelog_merge.pyttest_acceptance_bug_723968dscCsMd}tjtttd|}|jdddddgt|dS(	sLike test_acceptance_bug_723968, but with a more difficult conflict:
        the new entry and the edited entry are adjacent.
        cSstj||ddS(Ntentry_as_strcSs|S(N((tx((s]/usr/lib/python2.7/dist-packages/bzrlib/plugins/changelog_merge/tests/test_changelog_merge.pyt<lambda>s(Rtdefault_guess_edits(tnewtdeleted((s]/usr/lib/python2.7/dist-packages/bzrlib/plugins/changelog_merge/tests/test_changelog_merge.pytguess_editssRsOther entry O1s
This entry T1s
This entry T2sBase entry B1 edits
Base entry B2N(RRtsample2_base_entriestsample2_this_entriestsample2_other_entriesRR(RRR((s]/usr/lib/python2.7/dist-packages/bzrlib/plugins/changelog_merge/tests/test_changelog_merge.pyttest_more_complex_conflict{s		cCs#|jtjtjtgtdS(sDA conflict this plugin cannot resolve raises EntryConflict.
        N(tassertRaisesRt
EntryConflictRRR(R((s]/usr/lib/python2.7/dist-packages/bzrlib/plugins/changelog_merge/tests/test_changelog_merge.pyt
test_too_hardscCs\ddg}d	d
dg}tj||}|jdgd
dgddfgf|dS(sdefault_guess_edits matches a new entry only once.
        
        (Even when that entry is the best match for multiple old entries.)
        tAAAAAtBBBBBtDDDDDtBBBBBxtBBBBBxxN(R (R!(R"(R#(R$(R (R"(R$(R#(R!(RRR(Rtnew_in_othertdeleted_in_othertresult((s]/usr/lib/python2.7/dist-packages/bzrlib/plugins/changelog_merge/tests/test_changelog_merge.pyttest_default_guess_editss	(t__name__t
__module__RRRRR((((s]/usr/lib/python2.7/dist-packages/bzrlib/plugins/changelog_merge/tests/test_changelog_merge.pyRGs
				
tTestChangeLogMergercBs2eZdZdZdZdZdZRS(sTests for ChangeLogMerger class.
    
    Most tests should be unit tests for merge_entries (and its helpers).
    This class is just to cover the handful of lines of code in ChangeLogMerger
    itself.
    cCs&tj|j}|j|j|S(N(RtMergeBuildert
test_base_dirt
addCleanuptcleanup(Rtbuilder((s]/usr/lib/python2.7/dist-packages/bzrlib/plugins/changelog_merge/tests/test_changelog_merge.pytmake_builderscCs|j}|jd|jd|t|jdd|d||jtjdg}|jj	j
ddtj|ddddd}t
j|}||fS(Nsclog-idt	ChangeLogtothertthistchangelog_merge_filestfiletconflict(R1tadd_filet	tree_roottTruetchange_contentstmake_mergerRtMerge3Mergertthis_brancht
get_configtset_user_optiontMergeFileHookParamstNoneRtChangeLogMerger(Rt	base_textt	this_textt
other_textR0tmergertmerge_hook_paramstchangelog_merger((s]/usr/lib/python2.7/dist-packages/bzrlib/plugins/changelog_merge/tests/test_changelog_merge.pytmake_changelog_mergers

cCsMd}|j|td|t\}}|jd|j|dS(sNA conflict this plugin cannot resolve returns (not_applicable, None).
        cSsdjd|DS(Ntcss|]}|dVqdS(s
N((t.0tentry((s]/usr/lib/python2.7/dist-packages/bzrlib/plugins/changelog_merge/tests/test_changelog_merge.pys	<genexpr>s(tjoin(tentries((s]/usr/lib/python2.7/dist-packages/bzrlib/plugins/changelog_merge/tests/test_changelog_merge.pytentries_as_strsRKtnot_applicableN(RQN(RJRRRRBtmerge_contents(RRPRIRH((s]/usr/lib/python2.7/dist-packages/bzrlib/plugins/changelog_merge/tests/test_changelog_merge.pyt&test_merge_text_returns_not_applicables		cCs\|jddd\}}|j|\}}|jdddgf|t|fdS(s.A successful merge returns ('success', lines).RKs
this text
sother text
tsuccessN(RJRRRR(RRIRHtstatustlines((s]/usr/lib/python2.7/dist-packages/bzrlib/plugins/changelog_merge/tests/test_changelog_merge.pyttest_merge_text_returns_successs(R)R*t__doc__R1RJRSRW(((s]/usr/lib/python2.7/dist-packages/bzrlib/plugins/changelog_merge/tests/test_changelog_merge.pyR+s
			N(tbzrlibRRtbzrlib.testsRtbzrlib.plugins.changelog_mergeRR
RRRRRtTestCaseRtTestCaseWithTransportR+(((s]/usr/lib/python2.7/dist-packages/bzrlib/plugins/changelog_merge/tests/test_changelog_merge.pyt<module>s4						c

Copyright © 2017 || Recoded By Mr.Bumblebee