mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
tests: Avoid hidden logic with better .assert*() method choices
We'll get better failure messages if we use an assertion method that understands the comparison we're trying to make. If you make the comparison by hand and assertTrue(), you don't get much constructive feedback ;).
This commit is contained in:
parent
1fcf4a6550
commit
5a61600bc9
3 changed files with 6 additions and 6 deletions
|
|
@ -186,7 +186,7 @@ class TestUtils(LoggedTestCase):
|
|||
test_directory = os.path.join(os.path.dirname(__file__),
|
||||
'does_not_exist')
|
||||
utils.clean_output_dir(test_directory)
|
||||
self.assertTrue(not os.path.exists(test_directory))
|
||||
self.assertFalse(os.path.exists(test_directory))
|
||||
|
||||
def test_clean_output_dir_is_file(self):
|
||||
test_directory = os.path.join(os.path.dirname(__file__),
|
||||
|
|
@ -195,7 +195,7 @@ class TestUtils(LoggedTestCase):
|
|||
f.write('')
|
||||
f.close()
|
||||
utils.clean_output_dir(test_directory)
|
||||
self.assertTrue(not os.path.exists(test_directory))
|
||||
self.assertFalse(os.path.exists(test_directory))
|
||||
|
||||
def test_strftime(self):
|
||||
d = datetime.date(2012, 8, 29)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue