From d313af21a0f9507590befbafaceac1c3987e6d7c Mon Sep 17 00:00:00 2001 From: Julien Miotte Date: Thu, 21 Jul 2011 12:03:15 +0200 Subject: [PATCH] Adding a DirtyRepoTestCase to be able to test Repository.status(). Also, adding a dirty repository in the data directory. --- test/data/dirtyrepo.tar | Bin 0 -> 61440 bytes test/utils.py | 8 +++++++- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 test/data/dirtyrepo.tar diff --git a/test/data/dirtyrepo.tar b/test/data/dirtyrepo.tar new file mode 100644 index 0000000000000000000000000000000000000000..d9ac4425a040fbc3956ab5d17078f2ef2a891246 GIT binary patch literal 61440 zcmeHQd5k1ic^?}>=;n|eKtLemxo6lpcKW_%W<6_mXKnA=dw_R0PS|6%x~h7nJl$Qr zRn@yYcnt{=QbLFz2uLh&5=bBf#Gyzb1O<^e1c}2$Bv!CQ{s0n1#zBc45J{9o%J2K$ ztM2N%o9WrLO^v+n?y7px2x8TE*4XTVqq$kPUmyQDUsi`5d{D@Tu*a^n5tS^X5ezy*J1a&8ay*D7)|;E4;!Yj zUNbMRm#vDqUbPLYY?;Q+=RpK61??EPnHOMptb1l8-9Hr+`;8B z=$}s&iT>G4E*t9q9iV*VrY-s_``<7tre{ua`6s)7$oijd+W)y?hSvXdDj(8+WFqe1 z!DDKd7h3*1K;kpFX_x#f`+t&C8cY7Os|5>GjP%~ zA1eO=`#+y1`OoHyq5Myp3_alm=-(*e$8LlHi2kGc|BD&6|5Mpi=>P9YunAx6qW>0CY&`hRF|8L^7?gcQk|9fHOC+AvA{&zv}6&lBp{~R3u(Ek~-|HAnH?(<i(~gr~Q8>mxBEl=6~%z=XB8DG0X16nSk{FX!J++ zUxD}k*?c;r|L#+NYN{9gH%-l$Bo~ZB|03lH!vCMe{y&ue-RFS*^sj2JXF8J@!BG1T z!Y=cF3q?u)e1YVFLT&tLy@*;JVSe@$4bgZ{|>E?XND?s=I0PiJ#Y{jco5 z0z!hJ{+}=%dVxEm+m3lI8le&(*Ya#2U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E2v|uLv8&-Wn{)Bj@j5C zzp(2Wkam@XiDkKpYuy=#oQX)b?0($70~2kot$13~a``OYMrWi;S)8k47R!b5@=`9B zE^GP1a;{()x>3+FDN$G|7qwD3XX1V)vy>_>EiISxnUbE$Wli14rc1@;@=`iSTGCBQ zPp4EZj6N4dy|98|HJ4OD5GNiX#Kwp5EYjAh?Z7*!#Mq|>gkj{J2T+hAZ=)78`829X z>9i0eSvzLZu=OPLF55$)NgA3WNOeRk1$eSz*!$?>H$8P-Nf1KCy(c%_}`lldKnQ2^wWROpDXO zLrr1rlRFQ{$LR%FAlnM#dmUatbU4JP2}u(bt8OzWtBI0^y#OLov?6Z6yX0tKP*ouZNj|9l6XOnz+UjRrj5_+j?I7LKBo z^|vt@0h!|y1!m8;;dMo*6AkF_DvH4%6oc6JMG@C2C<7LVBLa{-e?~;kEu`uHNdsqD zAspEjTRSv(94f|v5Zkqo@j-p`)c?HxOJi#S=KnDLpUNQFqoe*m6YBp#RGZwrQT4x4 z5Xw%67zFHd*w*r}JBk)eLk6oQ96P4fT=MYI0nj9^ZsK$n z^>r7X$&ul@LF$ly%8;1&Sjhex^!`66fDZZ3(ksEj^FJm|iEe<{k8&Aq$ELLV!SG6m xfe-^B20{#k7zi;CVj#poh=C9TAqGMWgct}h5Mm(2K!|}510e=N3_PPS@c#yZon-(3 literal 0 HcmV?d00001 diff --git a/test/utils.py b/test/utils.py index 3245694..0fcfc1c 100644 --- a/test/utils.py +++ b/test/utils.py @@ -66,8 +66,10 @@ class BareRepoTestCase(BaseTestCase): class RepoTestCase(BaseTestCase): + repo_dir = 'testrepo' + def setUp(self): - repo_dir = 'testrepo' + repo_dir = self.repo_dir repo_path = os.path.join(os.path.dirname(__file__), 'data', repo_dir) temp_dir = tempfile.mkdtemp() tar = tarfile.open(repo_path + '.tar') @@ -76,3 +78,7 @@ class RepoTestCase(BaseTestCase): self._temp_dir = temp_dir temp_repo_path = os.path.join(temp_dir, repo_dir, '.git') self.repo = pygit2.Repository(temp_repo_path) + +class DirtyRepoTestCase(RepoTestCase): + + repo_dir = 'dirtyrepo'