Re: [sage-devel] Adding new unit tests

2011-08-01 Thread Michael Orlitzky
On 07/26/11 15:31, Burcin Erocal wrote:
 
 It is a good start. Here are some suggestions:
 
 - The code blocks should be preceeded with :: and indented. More
   information is available here:
 
 http://sagemath.org/doc/developer/conventions.html#documentation-strings

I don't see the :: documented anywhere (did I read past it?). What do
they do?

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


Re: [sage-devel] Adding new unit tests

2011-08-01 Thread John H Palmieri


On Monday, August 1, 2011 9:53:40 AM UTC-7, Michael Orlitzky wrote:

 On 07/26/11 15:31, Burcin Erocal wrote:
  
  It is a good start. Here are some suggestions:
  
  - The code blocks should be preceeded with :: and indented. More
information is available here:
  
  http://sagemath.org/doc/developer/conventions.html#documentation-strings

 I don't see the :: documented anywhere (did I read past it?). What do
 they do?


See http://sphinx.pocoo.org/rest.html#source-code.  In brief, as Simon 
says, you use it to introduce indented code blocks.  If you use

  Here is some code::

  blah
  blah

it gets rendered as Here is some code: followed by the code block.  If you 
replace the first line with

  Here is some code. ::

or

  Here is some code.
  ::

then the colon is not printed, but the code block is still rendered the same 
way.

There should be a link to http://sphinx.pocoo.org/rest.html in the Sage 
Developer's Guide, at the start of the Sphinx/ReST section...

-- 
John

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


Re: [sage-devel] Adding new unit tests

2011-07-26 Thread Burcin Erocal
On Mon, 25 Jul 2011 12:20:35 -0400
Michael Orlitzky mich...@orlitzky.com wrote:

 On 07/20/11 13:26, Burcin Erocal wrote:
  
  If you are adding tests only for integration, starting a new file
  sage/symbolic/tests.py might be better.
  
  ...
  
  Don't forget to mention the ticket number in the test.
  
 
 How's this looking?

It is a good start. Here are some suggestions:

- The code blocks should be preceeded with :: and indented. More
  information is available here:

http://sagemath.org/doc/developer/conventions.html#documentation-strings

- Since the file only contains integration tests, 
  sage/symbolic/integration/tests.py is a better place for it IMHO.

- I am not sure if a separate comment block is necessary for each test.
  I guess this makes sure that the test environment is always clean. It
  might add up to the time since it starts Sage so many times though.

You can create a new ticket on trac and upload the patch there so it
doesn't get lost.

Thanks.

Burcin

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


Re: [sage-devel] Adding new unit tests

2011-07-26 Thread Michael Orlitzky
On 07/26/11 15:31, Burcin Erocal wrote:

 How's this looking?
 
 It is a good start. Here are some suggestions:
 
 - The code blocks should be preceeded with :: and indented. More
   information is available here:
 
 http://sagemath.org/doc/developer/conventions.html#documentation-strings
 
 - Since the file only contains integration tests, 
   sage/symbolic/integration/tests.py is a better place for it IMHO.
 
 - I am not sure if a separate comment block is necessary for each test.
   I guess this makes sure that the test environment is always clean. It
   might add up to the time since it starts Sage so many times though.
 
 You can create a new ticket on trac and upload the patch there so it
 doesn't get lost.

Thanks for the tips. I'll make the suggested changes, and re-export the
patch with an associated ticket.

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


Re: [sage-devel] Adding new unit tests

2011-07-25 Thread Michael Orlitzky
On 07/20/11 13:26, Burcin Erocal wrote:
 
 If you are adding tests only for integration, starting a new file
 sage/symbolic/tests.py might be better.
 
 ...
 
 Don't forget to mention the ticket number in the test.
 

How's this looking?

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org
# HG changeset patch
# User Michael Orlitzky mich...@orlitzky.com
# Date 1311610421 14400
# Node ID b450716a016acfc05716a8c64e9ddabd91a61218
# Parent  8532a2ad1e558cbc91ddaaa6b7cc79956dd1e8ba
Add doctests for some known integration bugs. Tickets #11594, #11591, #11590, 
and #11238.

diff -r 8532a2ad1e55 -r b450716a016a sage/symbolic/tests.py
--- /dev/null   Thu Jan 01 00:00:00 1970 +
+++ b/sage/symbolic/tests.pyMon Jul 25 12:13:41 2011 -0400
@@ -0,0 +1,47 @@
+
+Test case for ticket #11594. See,
+
+  http://trac.sagemath.org/sage_trac/ticket/11594
+
+for more information.
+
+sage: integrate(abs(x^2 - 1), x, -2, 2)  # optional - bug
+4
+
+
+
+
+Test case for ticket #11591. See,
+
+  http://trac.sagemath.org/sage_trac/ticket/11591
+
+for more information.
+
+sage: f = (x^2)*exp(x) / (1+exp(x))^2 # optional - bug
+sage: integrate(f, (x, -infinity, infinity))  # optional - bug
+pi^(2/3)
+
+
+
+
+Test case for ticket #11590. See,
+
+  http://trac.sagemath.org/sage_trac/ticket/11590
+
+for more information.
+
+sage: integrate(x * sgn(x^2 - 1/4), x, -1, 0)  # optional - bug
+-1/4
+
+
+
+
+Test case for ticket #11238. See,
+
+  http://trac.sagemath.org/sage_trac/ticket/11238
+
+for more information.
+
+sage: integrate(exp(-x)*sinh(sqrt(x)), x, 0, infinity)  # optional - bug
+exp(1/4) * sqrt(pi)/2
+


Re: [sage-devel] Adding new unit tests

2011-07-20 Thread Burcin Erocal
On Tue, 19 Jul 2011 14:44:10 -0400
Michael Orlitzky mich...@orlitzky.com wrote:

 2. Subject to #1, where is the most appropriate place to add the
 tests? My first guess would be in the TESTS: section of
 sage/calculus/calculus.py, but there appear to be some standalone
 tests defined in sage/tests, too.

If you are adding tests only for integration, starting a new file
sage/symbolic/tests.py might be better.

There is a list of open integration tickets here:

http://trac.sagemath.org/sage_trac/wiki/symbolics

Don't forget to mention the ticket number in the test.


Cheers,
Burcin

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


Re: [sage-devel] Adding new unit tests

2011-07-20 Thread Michael Orlitzky
On 07/20/11 13:26, Burcin Erocal wrote:
 On Tue, 19 Jul 2011 14:44:10 -0400
 Michael Orlitzky mich...@orlitzky.com wrote:
 
 2. Subject to #1, where is the most appropriate place to add the
 tests? My first guess would be in the TESTS: section of
 sage/calculus/calculus.py, but there appear to be some standalone
 tests defined in sage/tests, too.
 
 If you are adding tests only for integration, starting a new file
 sage/symbolic/tests.py might be better.
 
 There is a list of open integration tickets here:
 
 http://trac.sagemath.org/sage_trac/wiki/symbolics
 
 Don't forget to mention the ticket number in the test.

This is what I've done so far. I'll figure out how to mark them
optional - bug, and post them when I'm done.

Thanks.

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


Re: [sage-devel] Adding new unit tests

2011-07-20 Thread Volker Braun
How about one adds a file with bugs in the name that lists the doctests 
together with their _wrong_ output and corresponding trac link. That way, 
we'll find out immediately which tickets are fixed by some upstream spkg 
update...

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


[sage-devel] Adding new unit tests

2011-07-19 Thread Michael Orlitzky
I'm interested in adding unit tests for the open symbolics bugs
(particular the integrate ones that affect me most), and I was wondering,

1. Is this a good idea? Adding tests for open bugs means the test suite
will fail. There seem to exist two camps with differing opinions on this.

2. Subject to #1, where is the most appropriate place to add the tests?
My first guess would be in the TESTS: section of
sage/calculus/calculus.py, but there appear to be some standalone tests
defined in sage/tests, too.

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org