Closed sampearl closed 5 years ago
@tophers42 @kyleabeauchamp @jtratner Could you all give this a look?
Specifically I wasn't certain whether I put my test in the proper place (shared_obs
), or that it would be properly parameterized/used by each type of OBS file system test using self.normal_path
and self.drive
.
I'll need another look from @jtratner et al then
Looks great - thanks!
I have one small request (that I can also do before merging if you’re okay with it): let’s get rid of the assertTrue(hasattr checks - the next couple lines cover the same thing ;)
Jeff
On Mon, Aug 5, 2019 at 09:43 Sam Pearlman notifications@github.com wrote:
Specifically I wasn't sure whether I put my test in the proper place ( shared_obs), or that it would be properly parameterized/used by each type of OBS file system test using self.normal_path and self.drive.
— You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/counsyl/stor/pull/121?email_source=notifications&email_token=AAMGHK7I4HJGCOWMF3C2WT3QDBKDXA5CNFSM4IJCADS2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3SMNEI#issuecomment-518309521, or mute the thread https://github.com/notifications/unsubscribe-auth/AAMGHKZ7YGLVJJZOIQ7O2DLQDBKDXANCNFSM4IJCADSQ .
@jtratner re: hasattr
- sure, if it doesn't have those methods it'll fail on the method invocation in a reasonable/useful way?
@sampearl - yep - see below
In [1]: import stor
stor
In [2]: stor.Path("whatever")
Out[2]: PosixPath('whatever')
In [3]: _.reaaadable()
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-3-3b3cec0e2a4b> in <module>
----> 1 _.reaaadable()
AttributeError: 'PosixPath' object has no attribute 'reaaadable'
Thanks for the PR @sampearl !
👍 !
readable
,writable
, andseekable
methods toOBSFile
readable
, False forwritable
when opened for readingreadable
, True forwritable
when opened for writing