Did I find the right examples for you? yes no

# cogent.struct.knots.PairedRegion

All Samples(470)  |  Call(468)  |  Derive(0)  |  Import(2)

```from cogent.util.dict2d import Dict2D
from cogent.struct.rna2d import Pairs
from cogent.struct.knots import PairedRegion, PairedRegionFromPairs,\
PairedRegions, PairedRegionsFromPairs, ConflictMatrix,\
opt_all, contains_true, empty_matrix,\
```
```    def test_init_valid(self):
"""PairedRegion __init__: should work as expected on valid input
"""
pr = PairedRegion(3,10,2)
self.assertEqual(pr.Start, 3)
self.assertEqual(pr.End, 10)
self.assertEqual(pr.Length, 2)
self.assertEqual(pr.Pairs, [(3,10),(4,9)])

pr = PairedRegion(3,10,2, Id=0)
```
```        pr = PairedRegion(3,10,2, Id=0)
self.assertEqual(pr.Id, 0)
pr = PairedRegion(3,10,2, Id='A')
self.assertEqual(pr.Id, 'A')

```
```    def test_init_weird(self):
"""PairedRegion __init__: no error checking
"""
pr = PairedRegion(3,6,4)
self.assertEqual(pr.Start, 3)
```

```from cogent.util.dict2d import Dict2D
from cogent.struct.rna2d import Pairs
from cogent.struct.knots import PairedRegion, PairedRegionFromPairs,\
PairedRegions, PairedRegionsFromPairs, ConflictMatrix,\
opt_all, contains_true, empty_matrix,\
```
```    def test_init_valid(self):
"""PairedRegion __init__: should work as expected on valid input
"""
pr = PairedRegion(3,10,2)
self.assertEqual(pr.Start, 3)
self.assertEqual(pr.End, 10)
self.assertEqual(pr.Length, 2)
self.assertEqual(pr.Pairs, [(3,10),(4,9)])

pr = PairedRegion(3,10,2, Id=0)
```
```        pr = PairedRegion(3,10,2, Id=0)
self.assertEqual(pr.Id, 0)
pr = PairedRegion(3,10,2, Id='A')
self.assertEqual(pr.Id, 'A')

```
```    def test_init_weird(self):
"""PairedRegion __init__: no error checking
"""
pr = PairedRegion(3,6,4)
self.assertEqual(pr.Start, 3)
```