def test_expression(self): self.assertEqual( main._parse_args(self._BASE_ARGV + ['in MiB/s']).expression, ['10Gb', 'in MiB/s'])
def test_no_expression(self): with self.assertRaises(SystemExit), _suppress_stderr(): main._parse_args(self._CMD)
def test_verbosity_implicit(self): self.assertEqual(main._parse_args(self._BASE_ARGV).verbosity, 0)
def test_verbosity_count(self): self.assertEqual( main._parse_args(self._BASE_ARGV + ['-vvvv']).verbosity, 4)
def test_version(self): with self.assertRaises(SystemExit), _suppress_stderr(): main._parse_args(['-V'])