Skip to content
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

tests: simplify timestamp mocking #132

Merged
merged 1 commit into from Aug 5, 2020

Conversation

eli-schwartz
Copy link
Contributor

$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).

$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).
@MasterOdin
Copy link
Member

Thanks for this! Definitely simplifies the testing stuff, and that this timestamp is definitely a bit more recognizable / easy to edit if we ever wanted to than the prior approach.

@MasterOdin MasterOdin merged commit 1c9ad5b into asciidoc-py:master Aug 5, 2020
@eli-schwartz
Copy link
Contributor Author

Yeah, editing a Unix epoch in seconds should be easier than "0X3DE170D6". :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SOURCE_DATE_EPOCH causes test failures
2 participants