~trb143/openlp/more_media

« back to all changes in this revision

Viewing changes to tests/functional/openlp_core/common/test_path.py

  • Committer: Tim Bentley
  • Date: 2019-06-11 18:08:21 UTC
  • mfrom: (2876.1.2 openlp)
  • Revision ID: tim.bentley@gmail.com-20190611180821-m0viu2wi93p2o97k
Head

Show diffs side-by-side

added added

removed removed

Lines of Context:
110
110
        # WHEN: Calling `path_to_str` with an invalid Type
111
111
        # THEN: A TypeError should have been raised
112
112
        with self.assertRaises(TypeError):
113
 
            path_to_str(str())
 
113
            path_to_str(57)
 
114
 
 
115
    def test_path_to_str_wth_str(self):
 
116
        """
 
117
        Test that `path_to_str` just returns a str when given a str
 
118
        """
 
119
        # GIVEN: The `path_to_str` function
 
120
        # WHEN: Calling `path_to_str` with a str
 
121
        result = path_to_str('/usr/bin')
 
122
 
 
123
        # THEN: The string should be returned
 
124
        assert result == '/usr/bin'
114
125
 
115
126
    def test_path_to_str_none(self):
116
127
        """