mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-17 01:26:45 +00:00
* Add support for metadata attributes for enum values (#7567) * Fix path lookup in flatc test * Try a fix for Windows paths * Convert path to string to fix Windows error
This commit is contained in:
@@ -51,6 +51,10 @@ def flatc(options, cwd=script_path):
|
||||
subprocess.check_call(cmd, cwd=str(cwd))
|
||||
|
||||
|
||||
def reflection_fbs_path():
|
||||
return Path(root_path).joinpath("reflection", "reflection.fbs")
|
||||
|
||||
|
||||
def make_absolute(filename, path=script_path):
|
||||
return str(Path(path, filename).absolute())
|
||||
|
||||
@@ -67,6 +71,14 @@ def assert_file_doesnt_exists(filename, path=script_path):
|
||||
return file
|
||||
|
||||
|
||||
def get_file_contents(filename, path=script_path):
|
||||
file = Path(path, filename)
|
||||
contents = ""
|
||||
with open(file) as file:
|
||||
contents = file.read()
|
||||
return contents
|
||||
|
||||
|
||||
def assert_file_contains(file, needles):
|
||||
with open(file) as file:
|
||||
contents = file.read()
|
||||
|
||||
Reference in New Issue
Block a user