File: test_api_groups_validation.py

package info (click to toggle)
gfapy 1.2.3%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,048 kB
  • sloc: python: 11,777; sh: 167; makefile: 68
file content (17 lines) | stat: -rw-r--r-- 539 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import gfapy
import unittest

class TestAPIGroupsValidation(unittest.TestCase):

  def test_invalid_path_gfa2(self):
    with self.assertRaises(gfapy.NotFoundError):
      g = gfapy.Gfa.from_file("tests/testdata/invalid_path.gfa2")

  def test_invalid_path_gfa2_vlevel0(self):
    g = gfapy.Gfa.from_file("tests/testdata/invalid_path.gfa2", vlevel = 0)
    with self.assertRaises(gfapy.NotFoundError):
      g.validate()

  def test_valid_path_gfa2(self):
    # nothing raised
    g = gfapy.Gfa.from_file("tests/testdata/valid_path.gfa2")