示例#1
0
文件: test_main.py 项目: gebn/nibble
 def test_expression(self):
     self.assertEqual(
         main._parse_args(self._BASE_ARGV + ['in MiB/s']).expression,
         ['10Gb', 'in MiB/s'])
示例#2
0
文件: test_main.py 项目: gebn/nibble
 def test_no_expression(self):
     with self.assertRaises(SystemExit), _suppress_stderr():
         main._parse_args(self._CMD)
示例#3
0
文件: test_main.py 项目: gebn/nibble
 def test_verbosity_implicit(self):
     self.assertEqual(main._parse_args(self._BASE_ARGV).verbosity, 0)
示例#4
0
文件: test_main.py 项目: gebn/nibble
 def test_verbosity_count(self):
     self.assertEqual(
         main._parse_args(self._BASE_ARGV + ['-vvvv']).verbosity, 4)
示例#5
0
文件: test_main.py 项目: gebn/nibble
 def test_version(self):
     with self.assertRaises(SystemExit), _suppress_stderr():
         main._parse_args(['-V'])