New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SOURCE_DATE_EPOCH causes test failures #131
Comments
To be clear, you've got |
Yeah, sorry, I managed to lose that part of my sentence when filing this issue... I ran into this while preparing the archlinux package update to 9.0.2 (yay python3) and I realized "hey, there is a testsuite here, it would be fantastic to run it while building the package". This is not very urgent as it only prevents me from adding the testsuite to my packaging recipe. But I've solved that anyway by running it with |
$SOURCE_DATE_EPOCH is now the officially supported mechanism for guaranteeing stable output timestamps, which means we can simply run the tests using that, and drop some code. This also fixes asciidoc-py#131 since the variable would override the mocked time, resulting in tests failing if $SOURCE_DATE_EPOCH was set in the environment (e.g. for linux distro packaging).
$SOURCE_DATE_EPOCH is now the officially supported mechanism for guaranteeing stable output timestamps, which means we can simply run the tests using that, and drop some code. This also fixes asciidoc-py#131 since the variable would override the mocked time, resulting in tests failing if $SOURCE_DATE_EPOCH was set in the environment (e.g. for linux distro packaging).
$SOURCE_DATE_EPOCH is now the officially supported mechanism for guaranteeing stable output timestamps, which means we can simply run the tests using that, and drop some code. This also fixes #131 since the variable would override the mocked time, resulting in tests failing if $SOURCE_DATE_EPOCH was set in the environment (e.g. for linux distro packaging).
Running the entire build/test/install cycle for asciidoc itself with this environment variable set, causes the testsuite to see surprising output. Many tests fail with output like this:
Solution: tests/testasciidoc.py should account for this in mock_localtime. Most likely, you could remove this entirely, and rely on defining SOURCE_DATE_EPOCH in the test setup. Otherwise, it will need to be deleted from os.environ. The former would provide free testing for the feature though. :)
The text was updated successfully, but these errors were encountered: