コード例 #1
0
ファイル: test_strutils.py プロジェクト: toconn/Python3-Core
 def test_ends_with_no_match(self):
     
     result = strutils.ends_with('ABC123', 'end')
     self.assertFalse(result)
コード例 #2
0
ファイル: ua_os_base.py プロジェクト: toconn/Python3-Core
    def join_path(self, root_dir, file):

        if strutils.ends_with(root_dir, self.file_separator()):
            return root_dir + file
        else:
            return root_dir + self.file_separator() + file
コード例 #3
0
ファイル: test_strutils.py プロジェクト: toconn/Python3-Core
 def test_ends_with_match(self):
     
     result = strutils.ends_with('ABC123end', 'end')
     self.assertTrue(result)
コード例 #4
0
ファイル: test_strutils.py プロジェクト: toconn/Python3-Core
 def test_ends_with_none(self):
     
     result = strutils.ends_with(None, 'end')
     self.assertFalse(result)
コード例 #5
0
    def test_ends_with_no_match(self):

        result = strutils.ends_with('ABC123', 'end')
        self.assertFalse(result)
コード例 #6
0
    def test_ends_with_match(self):

        result = strutils.ends_with('ABC123end', 'end')
        self.assertTrue(result)
コード例 #7
0
    def test_ends_with_none(self):

        result = strutils.ends_with(None, 'end')
        self.assertFalse(result)