New submission from Éric Araujo <mer...@netwok.org>: Many packaging tests use functions like os.mkdir and open to create files in order to test commands or actions, or slightly higher-level helpers like packaging.tests.support.TempdirManager.write_file.
I think this could be much more automated. There should be an helper function which could accept a string with a custom format describing directories, files and their contents, then create the files in a temp directory and later cleans it all. Likewise, it should be easier to check what new files are created (i.e. in the build or dist directory) and what their contents are. My ultimate goal is to move from low-level tests which use command objects directly to higher-level tests which actually run the pysetup script and check the results, so that tests get closer to what people do. This will also remove cruft in the tests, and let us change details more easily (because we’ll be testing behavior, not internal attributes or exact output). ---------- assignee: eric.araujo components: Distutils2 messages: 154453 nosy: alexis, eric.araujo, francismb, python-dev, shane.moore, tarek priority: normal severity: normal stage: needs patch status: open title: packaging tests: add helpers to create and inspect a tree of files type: enhancement versions: 3rd party _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue14140> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com