def test_my_rule(rule_runner): # create a file with some content rule_runner.write_files({"myfile.txt": "Hello World!"}) # create a snapshot of the created file snapshot = rule_runner.make_snapshot("filepath/myfile.txt") # assert the snapshot contents are as expected assert snapshot.files == {"myfile.txt": "Hello World!"}In the above example, we create a file with some content, and then create a snapshot of the file using `make_snapshot` method. The created snapshot is then asserted that its contents are the same as expected. Package/Library: Pants