← Back to team overview

openlp-core team mailing list archive

Re: [Merge] lp:~thelinuxguy/openlp/fix-1490184 into lp:openlp

 

Review: Needs Fixing

Four new tests is great but we do have a style about our tests.
All the tests are based around the simple structure.  Note the comments are very important as they are the only part of the test visible when it fails so it give a clue where to look

# GIVEN:

# WHEN:

# THEN:

so 

def test_get_format_list(self):
   self.assertEquals(len(SongFormat.get_format_list()), len(SongFormat.__attributes__))


becomes something like.

def test_get_format_list(self):
   """
   Test for default format list
   """
   # GIVEN: a SongFormat 

   # WHEN: I have a basic object

   # THEN: the following data should be constructed
   self.assertEquals(len(SongFormat.get_format_list()), len(SongFormat.__attributes__), 'The correct number of attributes have not been created')
-- 
https://code.launchpad.net/~thelinuxguy/openlp/fix-1490184/+merge/281428
Your team OpenLP Core is subscribed to branch lp:openlp.


References