def test_options_files(): my_opts = MyOpts('jms', '0.0.2', archiver='gzip', args=['mac', 'win', 'arm']) assert main(my_opts) is True assert os.path.exists('jms-mac-0.0.2.tar.gz') is True
def test_options_bad_platform(): my_opts = MyOpts('jms', '0.0', args=['macaroni']) main(my_opts)
def test_options_bad_version(): my_opts = MyOpts('jms', '0.0', args=['mac', 'win', 'arm']) main(my_opts)
def test_options_bad_name(): my_opts = MyOpts('jms', '0.0.1', args=['mac', 'win', 'arm']) del my_opts.name if hasattr(my_opts, 'name'): delattr(my_opts, 'name') main(my_opts)
def test_options_no_file(): my_opts = MyOpts('jms', '0.0.1') assert main(my_opts) is False