How to use test_make_sdist method in tox

Best Python code snippet using tox_python

test_sdist.py

Source:test_sdist.py Github

copy

Full Screen

...4import tarfile5from testpath import assert_isfile6from flit_core import sdist7samples_dir = Path(__file__).parent / 'samples'8def test_make_sdist(tmp_path):9 # Smoke test of making a complete sdist10 builder = sdist.SdistBuilder.from_ini_path(samples_dir / 'package1.toml')11 builder.build(tmp_path)12 assert_isfile(tmp_path / 'package1-0.1.tar.gz')13def test_clean_tarinfo():14 with tarfile.open(mode='w', fileobj=BytesIO()) as tf:15 ti = tf.gettarinfo(str(samples_dir / 'module1.py'))16 cleaned = sdist.clean_tarinfo(ti, mtime=42)17 assert cleaned.uid == 018 assert cleaned.uname == ''19 assert cleaned.mtime == 4220def test_include_exclude():21 builder = sdist.SdistBuilder.from_ini_path(22 samples_dir / 'inclusion' / 'pyproject.toml'...

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run tox automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful