def test_to_str_space(self): ''' Test to_str with 'my pool/my dataset' ''' # NOTE: for fun we use both the '"str"' and "\"str\"" way of getting the literal string: "str" self.assertEqual(zfs.to_str('my pool/my dataset'), '"my pool/my dataset"') self.assertEqual(zfs.to_str(zfs.to_str('my pool/my dataset')), "\"my pool/my dataset\"")
def test_to_str_squote_space(self): ''' Test to_str with "my pool/jorge's dataset" ''' self.assertEqual(zfs.to_str("my pool/jorge's dataset"), "\"my pool/jorge's dataset\"") self.assertEqual(zfs.to_str(zfs.to_str("my pool/jorge's dataset")), "\"my pool/jorge's dataset\"")
def test_to_str_squote_space(self): """ Test to_str with "my pool/jorge's dataset" """ self.assertEqual(zfs.to_str("my pool/jorge's dataset"), '"my pool/jorge\'s dataset"') self.assertEqual( zfs.to_str(zfs.to_str("my pool/jorge's dataset")), '"my pool/jorge\'s dataset"', )
def test_to_str_passthrough(self): """ Test to_str with 'passthrough' """ self.assertEqual(zfs.to_str("passthrough"), "passthrough") self.assertEqual(zfs.to_str(zfs.to_str("passthrough")), "passthrough")
def test_to_str_none(self): """ Test to_str with 'none' """ self.assertEqual(zfs.to_str(None), "none") self.assertEqual(zfs.to_str(zfs.to_str(None)), "none")
def test_to_str_passthrough(self): ''' Test to_str with 'passthrough' ''' self.assertEqual(zfs.to_str('passthrough'), 'passthrough') self.assertEqual(zfs.to_str(zfs.to_str('passthrough')), 'passthrough')
def test_to_str_none(self): ''' Test to_str with 'none' ''' self.assertEqual(zfs.to_str(None), 'none') self.assertEqual(zfs.to_str(zfs.to_str(None)), 'none')