def test_safe_str(self): self.assertEqual(safe_str('foo'), 'foo') self.assertEqual(safe_str(escaped_str('foo')), escaped_str('foo')) self.assertEqual(safe_str(jbos('foo')).bits, jbos('foo').bits) self.assertRaises(NotImplementedError, safe_str, 123)
def test_literals(self): self.assertEqual(safe_str(literal('foo')), literal('foo')) self.assertEqual(safe_str(shell_literal('foo')), shell_literal('foo'))
def test_jbos(self): self.assertEqual(safe_str(jbos('foo')).bits, jbos('foo').bits)
def test_string(self): self.assertEqual(safe_str('foo'), 'foo')
def test_safe_str(self): self.assertEqual(safe_str('foo'), 'foo') self.assertEqual(safe_str(literal('foo')), literal('foo')) self.assertEqual(safe_str(shell_literal('foo')), shell_literal('foo')) self.assertEqual(safe_str(jbos('foo')).bits, jbos('foo').bits) self.assertRaises(NotImplementedError, safe_str, 123)