def test_w_windows_path(self): with self.assertRaisesRegexp(TypeError, 'unsupported operand'): posix.PosixPath('my/path') + windows.WindowsPath(r'other\path')
def test_success(self): p = windows.WindowsPath(r'my\path') / r'other\path' self.assertEquals(p, windows.WindowsPath(r'my\path\other\path'))
def test_w_swift_component(self): with self.assertRaisesRegexp(TypeError, 'unsupported operand'): windows.WindowsPath(r'my\path') + swift.SwiftPath('swift://t/c/name').name
def test_w_s3_component(self): with self.assertRaisesRegexp(TypeError, 'unsupported operand'): windows.WindowsPath(r'my\path') + s3.S3Path('s3://b/name').name
def test_w_posix_path(self): with self.assertRaisesRegexp(TypeError, 'unsupported operand'): windows.WindowsPath(r'my\path') / posix.PosixPath('other/path')