コード例 #1
0
ファイル: test_locations.py プロジェクト: SBGlab/antismash
 def test_single(self):
     for strand in [1, -1]:
         location = FeatureLocation(6, 9, strand)
         new = build_location_from_others([location])
         assert isinstance(new, FeatureLocation) and not isinstance(
             new, CompoundLocation)
         assert new == location
コード例 #2
0
ファイル: test_locations.py プロジェクト: SBGlab/antismash
 def test_single_compound(self):
     for strand in [1, -1]:
         location = CompoundLocation([
             FeatureLocation(6, 9, strand),
             FeatureLocation(12, 16, strand)
         ])
         new = build_location_from_others([location])
         assert new == location
コード例 #3
0
 def test_all_merged(self):
     for strand in [1, -1]:
         locations = [FeatureLocation(6, 9, strand),
                      FeatureLocation(9, 12, strand),
                      FeatureLocation(12, 16, strand)]
         new = build_location_from_others(locations)
         assert isinstance(new, FeatureLocation) and not isinstance(new, CompoundLocation)
         assert new == FeatureLocation(6, 16, strand)
コード例 #4
0
 def test_some_merged(self):
     for strand in [1, -1]:
         locations = [FeatureLocation(1, 4, strand),
                      FeatureLocation(6, 9, strand),
                      FeatureLocation(9, 12, strand),
                      FeatureLocation(15, 18, strand)]
         new = build_location_from_others(locations)
         assert isinstance(new, CompoundLocation)
         assert new == CompoundLocation([FeatureLocation(1, 4, strand),
                                         FeatureLocation(6, 12, strand),
                                         FeatureLocation(15, 18, strand)])
コード例 #5
0
ファイル: test_locations.py プロジェクト: SBGlab/antismash
 def test_separate(self):
     locations = [FeatureLocation(6, 9, 1), FeatureLocation(12, 16, 1)]
     new = build_location_from_others(locations)
     assert isinstance(new, CompoundLocation)
     assert new == CompoundLocation(locations)