chrisdrackett / django-typogrify

Typogrify is a collection of Django template filters that help prettify your web typography by preventing ugly quotes and widows and providing CSS hooks to style some special cases.
Other
107 stars 21 forks source link

Fuzzy dates test doesn't pass. #4

Closed typeshige closed 13 years ago

typeshige commented 13 years ago

The test fails on my system. I can post what it says in a little bit if that would be helpful.

Thanks.

chrisdrackett commented 13 years ago

yeah, let me know. The tests passed for me last time I committed, but with a traceback I would be happy to take a look.

typeshige commented 13 years ago

This is what I get on my machine.

I took a peek at what what the variable format was set to when it fails and it's "N j, Y"

FAIL: test_formats_other_years (typogrify.tests.fuzzydate.TestFuzzyDate)

Traceback (most recent call last): File "/home/django/.virtualenvs/astrobiology/src/django-typogrify/typogrify/tests/fuzzydate.py", line 38, in test_formats_other_years self.assertEquals(fuzzydate(testdate), expected) AssertionError: u'Oct. 10, 1984' != 'October 10th, 1984'

Also, in typogrify_tags.py lines 182-184 are variable assignments that are never used....

Thanks, Shige

chrisdrackett commented 13 years ago

yeah, the issue here is that it uses the date format from settings. I try and override this here:

https://github.com/chrisdrackett/django-typogrify/blob/master/typogrify/tests/fuzzydate.py#L9

not sure why it isn't sticking for you. Do you have the most recent code?

typeshige commented 13 years ago

I do, but now that I look at it more closely, on L9, setup should be setUp.

As in this example:

https://docs.djangoproject.com/en/dev/topics/testing/#example

chrisdrackett commented 13 years ago

try now?

typeshige commented 13 years ago

It's all good now!

chrisdrackett commented 13 years ago

thanks for the help!