Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_valid_contextj(self):
zwnj = u'\u200c'
zwj = u'\u200d'
virama = u'\u094d'
latin = u'\u0061'
# RFC 5892 Appendix A.1 (Zero Width Non-Joiner)
self.assertFalse(idna.valid_contextj(zwnj, 0))
self.assertFalse(idna.valid_contextj(latin + zwnj, 1)) # No preceding Virama
self.assertTrue(idna.valid_contextj(virama + zwnj, 1)) # Preceding Virama
# RFC 5892 Appendix A.2 (Zero Width Joiner)
self.assertFalse(idna.valid_contextj(zwj, 0))
self.assertFalse(idna.valid_contextj(latin + zwj, 1)) # No preceding Virama
self.assertTrue(idna.valid_contextj(virama + zwj, 1)) # Preceding Virama
def test_valid_contextj(self):
zwnj = u'\u200c'
zwj = u'\u200d'
virama = u'\u094d'
latin = u'\u0061'
# RFC 5892 Appendix A.1 (Zero Width Non-Joiner)
self.assertFalse(idna.valid_contextj(zwnj, 0))
self.assertFalse(idna.valid_contextj(latin + zwnj, 1)) # No preceding Virama
self.assertTrue(idna.valid_contextj(virama + zwnj, 1)) # Preceding Virama
# RFC 5892 Appendix A.2 (Zero Width Joiner)
self.assertFalse(idna.valid_contextj(zwj, 0))
self.assertFalse(idna.valid_contextj(latin + zwj, 1)) # No preceding Virama
self.assertTrue(idna.valid_contextj(virama + zwj, 1)) # Preceding Virama
def test_valid_contextj(self):
zwnj = u'\u200c'
zwj = u'\u200d'
virama = u'\u094d'
latin = u'\u0061'
# RFC 5892 Appendix A.1 (Zero Width Non-Joiner)
self.assertFalse(idna.valid_contextj(zwnj, 0))
self.assertFalse(idna.valid_contextj(latin + zwnj, 1)) # No preceding Virama
self.assertTrue(idna.valid_contextj(virama + zwnj, 1)) # Preceding Virama
# RFC 5892 Appendix A.2 (Zero Width Joiner)
self.assertFalse(idna.valid_contextj(zwj, 0))
self.assertFalse(idna.valid_contextj(latin + zwj, 1)) # No preceding Virama
self.assertTrue(idna.valid_contextj(virama + zwj, 1)) # Preceding Virama
def test_valid_contextj(self):
zwnj = u'\u200c'
zwj = u'\u200d'
virama = u'\u094d'
latin = u'\u0061'
# RFC 5892 Appendix A.1 (Zero Width Non-Joiner)
self.assertFalse(idna.valid_contextj(zwnj, 0))
self.assertFalse(idna.valid_contextj(latin + zwnj, 1)) # No preceding Virama
self.assertTrue(idna.valid_contextj(virama + zwnj, 1)) # Preceding Virama
# RFC 5892 Appendix A.2 (Zero Width Joiner)
self.assertFalse(idna.valid_contextj(zwj, 0))
self.assertFalse(idna.valid_contextj(latin + zwj, 1)) # No preceding Virama
self.assertTrue(idna.valid_contextj(virama + zwj, 1)) # Preceding Virama