On Wed, Feb 27, 2013 at 12:29 PM, Aaron Meurer <[email protected]> wrote:
> It means there is whitespace at the end of the line. Use
> bin/strip_whitespace to fix the problem.
>
Thank you!
That did it. I guess sympy counts line numbers differently than I expected.
I have a new question. This is probably a really basic Python question
but I can't find this specific issue addressed. bin/test raises an error
is calls "old-fashioned raise statement" or something like that.
It presumably occurs in a line such as
if <bad boolean condition>:
raise ValueError("don't do that")
Apparently Python 3 does not like this? I don't understand the
pages on porting which explain how to translate statements like this
into Python 3. I must be being stupid.
If I changed it to
if <bad boolean condition>:
raise ValueError
would that be okay?
> Aaron Meurer
>
> On Feb 27, 2013, at 10:11 AM, David Joyner <[email protected]> wrote:
>
>> On Fri, Feb 22, 2013 at 8:35 PM, Aaron Meurer <[email protected]> wrote:
>>> On Fri, Feb 22, 2013 at 6:00 PM, David Joyner <[email protected]> wrote:
>>
>> ...
>>
>>>
>>> Tests and docstrings serve different purposes. Docstring examples
>>> should demonstrate to the user what the functionality is, and what the
>>> input and outputs look like.
>>>
>>> Tests test for correctness of the code. Ideally, each line of the
>>> code should be covered by one of the tests. Some tests would be
>>> stupid as examples, like trivial corner cases.
>>
>>
>> How is the following output of bin/test in my crypto branch to be
>> interpreted?
>> (IMHO, there is no whitepsace problem in line 14 or crypto.py.)
>>
>>
>> _______________________
>> sympy/utilities/tests/test_code_quality.py:test_files
>> _______________________
>> File
>> "/home/david/pythonfiles/sympy/sympy/utilities/tests/test_code_quality.py",
>> line 173, in test_files
>> check_directory_tree(SYMPY_PATH, test, exclude)
>> File
>> "/home/david/pythonfiles/sympy/sympy/utilities/tests/test_code_quality.py",
>> line 70, in check_directory_tree
>> check_files(glob(join(root, pattern)), file_check, exclusions)
>> File
>> "/home/david/pythonfiles/sympy/sympy/utilities/tests/test_code_quality.py",
>> line 86, in check_files
>> file_check(fname)
>> File
>> "/home/david/pythonfiles/sympy/sympy/utilities/tests/test_code_quality.py",
>> line 107, in test
>> test_this_file(fname, test_file)
>> File
>> "/home/david/pythonfiles/sympy/sympy/utilities/tests/test_code_quality.py",
>> line 115, in test_this_file
>> assert False, message_space % (fname, idx + 1)
>> AssertionError: File contains trailing whitespace:
>> /home/david/pythonfiles/sympy/sympy/crypto/crypto.py, line 14.
>>
>>
>>
>> ...
>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "sympy" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To post to this group, send email to [email protected].
>> Visit this group at http://groups.google.com/group/sympy?hl=en.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "sympy" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/sympy?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
--
You received this message because you are subscribed to the Google Groups
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sympy?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.