Skip to content
Snippets Groups Projects
Commit 4fad80b8 authored by Hamish Graham's avatar Hamish Graham
Browse files

Merge branch 'hamish' of https://gitlab.cern.ch/abpcomputing/sandbox/tree_maker into hamish

parents 6011ef03 a9ed00f3
Branches
No related tags found
No related merge requests found
Pipeline #3019189 passed
...@@ -7,9 +7,7 @@ import pytz ...@@ -7,9 +7,7 @@ import pytz
import json import json
from collections import OrderedDict from collections import OrderedDict
from time import sleep from time import sleep
import rich
from rich.progress import track
from rich.progress import Progress
# load the configuration # load the configuration
def read_yaml(myfile, verbose=False): def read_yaml(myfile, verbose=False):
......
...@@ -11,18 +11,18 @@ def test_method1(): ...@@ -11,18 +11,18 @@ def test_method1():
def test_sum_is_five(): def test_sum_is_five():
assert nj.sum_is_five(1, 4) == True assert nj.sum_is_five(1, 4) == True
def test_tag_first(): #def test_tag_first():
tag.tag_first('example_file.yaml', 'hello') # tag.tag_first('example_file.yaml', 'hello')
a = tag.read_yaml('example_file.yaml') # a = tag.read_yaml('example_file.yaml')
b = tag.convert_to_dict(a) # b = tag.convert_to_dict(a)
assert b['0']['tag'] == 'hello' # assert b['0']['tag'] == 'hello'
def test_tag_it(): #def test_tag_it():
tag.tag_first('example_file.yaml', 'hello') # tag.tag_first('example_file.yaml', 'hello')
tag.tag_it('example_file.yaml', 'bonjour') # tag.tag_it('example_file.yaml', 'bonjour')
a = tag.read_yaml('example_file.yaml') # a = tag.read_yaml('example_file.yaml')
b = tag.convert_to_dict(a) # b = tag.convert_to_dict(a)
assert b['1']['tag'] == 'bonjour' # assert b['1']['tag'] == 'bonjour'
def write_yaml(): def write_yaml():
tag.write_yaml({'green': 'hello'}, ('mytest.yaml')) tag.write_yaml({'green': 'hello'}, ('mytest.yaml'))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment