Skip to content
Snippets Groups Projects
test_bline.py 593 B
Newer Older
dsentinel's avatar
dsentinel committed
#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""Tests for `bline` package."""

import unittest
import sys

from unittest.mock import patch

dsentinel's avatar
dsentinel committed

class TestBline(unittest.TestCase):
    """Tests for `bline` package."""

    def test_import(self):
        """Test bline import"""
        with patch.object(sys, 'argv', ['bline']):
            with self.assertRaises(SystemExit):
                try:
                    import bline.bline as bp
                    self.assertTrue(bp.PROG_NAME, 'BLINE')
                except ImportError:
                    self.fail('Failed to import bline!')