def test_error_allow_micro(): args = cli.parse(['-e', '-', '--micro', '123']) assert args.error is None qr = cli.make_code(args) assert qr.is_micro assert 'M1' == qr.version assert qr.error is None
def test_error3(): args = cli.parse(['-e', '-', '123']) assert args.error is None qr = cli.make_code(args) assert not qr.is_micro assert 1 == qr.version assert 'H' == qr.error
def test_version_micro_m1(): args = cli.parse(['-v', 'M1', '12345']) assert args.version == 'M1' qr = cli.make_code(args) assert 'M1' == qr.version
def test_version2(): args = cli.parse(['--version', '40', '']) assert args.version == '40' qr = cli.make_code(args) assert 40 == qr.version
def test_version(): args = cli.parse(['-v', '1', '']) assert args.version == '1' qr = cli.make_code(args) assert 1 == qr.version
def test_micro_true(): args = cli.parse(['--micro', '']) assert args.micro qr = cli.make_code(args) assert qr.is_micro
def test_pattern2(): args = cli.parse(['--pattern', '5', '']) assert args.pattern == 5 qr = cli.make_code(args) assert qr.mask == 5
def test_mode2(): args = cli.parse(['--mode=byte', '']) assert args.mode == 'byte' qr = cli.make_code(args) assert 'byte' == qr.mode
def test_pattern(): args = cli.parse(['-p', '1', '']) assert args.pattern == 1 qr = cli.make_code(args) assert qr.mask == 1
def test_mode(): args = cli.parse(['-m', 'alphanumeric', 'A']) assert args.mode == 'alphanumeric' qr = cli.make_code(args) assert 'alphanumeric' == qr.mode
def test_version_micro_m2_automatic(): args = cli.parse(['--micro', '123456']) qr = cli.make_code(args) assert 'M2' == qr.version
def test_micro_false(): args = cli.parse(['--no-micro', '']) assert not args.micro qr = cli.make_code(args) assert not qr.is_micro
def test_error(): args = cli.parse(['-e', 'm', '']) assert args.error == 'M' qr = cli.make_code(args) assert 'H' == qr.error
def test_error2(): args = cli.parse(['-e', 'M', '']) assert args.error == 'M' qr = cli.make_code(args) assert 'H' == qr.error
def test_error4(): args = cli.parse(['--error=q', '--no-error-boost', '']) assert args.error == 'Q' qr = cli.make_code(args) assert 'Q' == qr.error