File: test_unit_symbol_invert.py

package info (click to toggle)
gfapy 1.0.0%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 1,932 kB
  • sloc: python: 11,549; sh: 167; makefile: 66
file content (16 lines) | stat: -rw-r--r-- 430 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import unittest
import gfapy

class TestUnitSymbolInvert(unittest.TestCase):

  def test_invert_orientations(self):
    self.assertEqual("+", gfapy.invert("-"))
    self.assertEqual("-", gfapy.invert("+"))

  def test_invert_segment_ends(self):
    self.assertEqual("L", gfapy.invert("R"))
    self.assertEqual("R", gfapy.invert("L"))

  def test_invert_invalid(self):
    self.assertRaises(gfapy.ValueError, gfapy.invert, "xx")