[Scons-users] 2615 Issue

Adarsh Sanjeev adarshsanjeev at gmail.com
Mon Feb 29 11:41:01 EST 2016


Hi,

I'm still working on this issue, and I have gone through the source code
for CacheDirTests.py. I do not understand why test_CachePush replaces the
function with its own self.push for the test, if it is testing it.

As per what you said, I do not understand why two cacheDirs have to be made
to test for read only. Isn't it enough to push a file to a read only cache?
Furthermore, is a read only cache the only case that I should handle? What
about if os.makedir fails for the cache?

Also, is there any documentation specifically on writing tests for scons,
other that the unittest documentation?

Thanks!

On Thu, Feb 18, 2016 at 11:53 PM, Schleimer, Ben via Scons-users <
scons-users at scons.org> wrote:

> Hi Adarsh,
>
>    test_CachePush() always assumes that the push will suceed.
>
>    You proabably will want to create a new test case for the issue.
> Briefly looking at the CacheDir() code, it seems that readonly is never
> checked.
>
> I would make a TestCase that creates a CacheDir, makes it's path readonly
> and then creates another CacheDir with the same path and checks its
> readonly state and behavior when it tries to push.
>
> Cheers
> Ben
>
>
>
>
> On Thursday, February 18, 2016 8:51 AM, Adarsh Sanjeev <
> adarshsanjeev at gmail.com> wrote:
>
>
>
> I was trying to solve issue 2615 in the tracker, which is no error message
> on failure to create the cache directory. I am attempting to write a test
> for this case, in
>
> 186: test_CachePush : src/engine/SCons/CacheDirTests.py.
>
>  Am I on the right path? Also, can anyone guide me on writing the test for
> this case?
>
> --
> Adarsh Sanjeev
>
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>
>
>
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>
>


-- 
Adarsh Sanjeev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20160229/34832067/attachment.html>


More information about the Scons-users mailing list