OK can someone please review?<div><br></div><div><a href="https://github.com/cmello/IronLanguages-main/commit/0d9cad9e1ef203df6131b9d44013a0e0f31b8088">https://github.com/cmello/IronLanguages-main/commit/0d9cad9e1ef203df6131b9d44013a0e0f31b8088</a> </div>
<div><br></div><div>The test passes but I still don&#39;t know if/where to enable that test in the build?</div><div><br></div><div>Thank you.</div><div><br></div><div>Best regards</div><div>Mello<br><br><div class="gmail_quote">
On Sat, Mar 3, 2012 at 12:57 PM, Cesar Mello <span dir="ltr">&lt;<a href="mailto:cmello@gmail.com">cmello@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I could run the test using the command line:<div><br></div><div><div>D:\workspace-git\IronLanguages-main\Languages\IronPython\Internal&gt;ipy ..\..\..\External.LCA_RESTRICTED\Languages\IronPython\27\Lib\test\test_datetime.py</div>

</div><div><br></div><div>And then got 4 failures, including the one I want to fix:</div><div><br></div><div><div>======================================================================</div><div>ERROR: test_total_seconds (__main__.TestTimeDelta)</div>

<div>----------------------------------------------------------------------</div><div>Traceback (most recent call last):</div><div>  File &quot;..\..\..\External.LCA_RESTRICTED\Languages\IronPython\27\Lib\test\test_datetime.py&quot;, line 269, in test_total_seconds</div>

<div>    self.assertEqual(td.total_seconds(), 31536000.0)</div><div>AttributeError: &#39;timedelta&#39; object has no attribute &#39;total_seconds&#39;</div><div><br></div><div>======================================================================</div>

</div><div><br></div><div><br></div><div>Just couldn&#39;t figure out yet how to run all the IronPython tests at once.</div><div><br></div><div>Best regards</div><span class="HOEnZb"><font color="#888888"><div>Mello</div>
</font></span><div class="HOEnZb"><div class="h5"><div><br><div class="gmail_quote">On Sat, Mar 3, 2012 at 12:08 PM, Cesar Mello <span dir="ltr">&lt;<a href="mailto:cmello@gmail.com" target="_blank">cmello@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<div><br></div><div>Any help here is appreciated. </div><div><br></div><div>I found a related unit test here:</div>
<div>
<br></div><div>main\External.LCA_RESTRICTED\Languages\IronPython\27\Lib\test\test_datetime.py:</div>
<div><br></div><div><div>    def test_total_seconds(self):</div><div>        td = timedelta(days=365)</div><div>        self.assertEqual(td.total_seconds(), 31536000.0)</div><div>        for total_seconds in [123456.789012, -123456.789012, 0.123456, 0, 1e6]:</div>


<div>            td = timedelta(seconds=total_seconds)</div><div>            self.assertEqual(td.total_seconds(), total_seconds)</div><div>        # Issue8644: Test that td.total_seconds() has the same</div><div>        # accuracy as td / timedelta(seconds=1).</div>


<div>        for ms in [-1, -2, -123]:</div><div>            td = timedelta(microseconds=ms)</div><div>            self.assertEqual(td.total_seconds(),</div><div>                             ((24*3600*td.days + td.seconds)*10**6</div>


<div>                              + td.microseconds)/10**6)</div></div><div><br></div><div><br></div><div>I would like to know how to enable and run this in the build.</div><div><br></div><div>Thank you very much.</div>

<span><font color="#888888"><div>
Mello</div></font></span><div><div><div><br></div><div><br></div><div><br></div><div><br><br><div class="gmail_quote">On Fri, Mar 2, 2012 at 2:10 PM, Jeff Hardy <span dir="ltr">&lt;<a href="mailto:jdhardy@gmail.com" target="_blank">jdhardy@gmail.com</a>&gt;</span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Just an oversight. Can you open an issue on <a href="http://ironpython.codeplex.com" target="_blank">ironpython.codeplex.com</a>?<br>



Should be easy enough to get this in. If you&#39;re up to it, a pull<br>
request would be even better :)<br>
<br>
- Jeff<br>
<div><div><br>
On Fri, Mar 2, 2012 at 8:54 AM, Cesar Mello &lt;<a href="mailto:cmello@gmail.com" target="_blank">cmello@gmail.com</a>&gt; wrote:<br>
&gt; Hi!<br>
&gt;<br>
&gt; This method doesn&#39;t seem to be implemented. From<br>
&gt; <a href="http://docs.python.org/library/datetime.html" target="_blank">http://docs.python.org/library/datetime.html</a> :<br>
&gt; timedelta.total_seconds()<br>
&gt;<br>
&gt; Return the total number of seconds contained in the duration. Equivalent to<br>
&gt; (td.microseconds + (td.seconds + td.days * 24 * 3600) * 10**6) /10**6<br>
&gt; computed with true division enabled.<br>
&gt;<br>
&gt; Note that for very large time intervals (greater than 270 years on most<br>
&gt; platforms) this method will lose microsecond accuracy.<br>
&gt;<br>
&gt; New in version 2.7.<br>
&gt;<br>
&gt;<br>
&gt; Best regards!<br>
&gt; Mello<br>
&gt;<br>
</div></div>&gt; _______________________________________________<br>
&gt; Ironpython-users mailing list<br>
&gt; <a href="mailto:Ironpython-users@python.org" target="_blank">Ironpython-users@python.org</a><br>
&gt; <a href="http://mail.python.org/mailman/listinfo/ironpython-users" target="_blank">http://mail.python.org/mailman/listinfo/ironpython-users</a><br>
&gt;<br>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>