Skip to content

Commit

Permalink
fix: turn off obsolete file tracking by default (#391)
Browse files Browse the repository at this point in the history
* fix: turn off obsolete file tracking by default

Fixes #390

The file system's timestamps are not reliably, there is no way synth.py should have ever ended up in the list of generated files, as happened here: https://github.com/googleapis/nodejs-datalabeling/blob/master/synth.metadata

* Rename test to test_track_obselete_files_defaults_to_false.
  • Loading branch information
SurferJeffAtGoogle committed Jan 30, 2020
1 parent 965fe83 commit c2c8465
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion synthtool/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@


_metadata = metadata_pb2.Metadata()
_track_obsolete_files = True
_track_obsolete_files = False


def reset() -> None:
Expand Down
4 changes: 2 additions & 2 deletions tests/test_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,8 +262,8 @@ def preserve_track_obsolete_file_flag():
metadata.set_track_obsolete_files(should_track_obselete_files)


def test_track_obsolete_files_defaults_to_true(preserve_track_obsolete_file_flag):
assert metadata.should_track_obsolete_files()
def test_track_obsolete_files_defaults_to_false(preserve_track_obsolete_file_flag):
assert not metadata.should_track_obsolete_files()


def test_set_track_obsolete_files(preserve_track_obsolete_file_flag):
Expand Down

0 comments on commit c2c8465

Please sign in to comment.