Skip to content

How to generate class variables depending on command line? #9101

Answered by GeJintian
GeJintian asked this question in Q&A
Discussion options

You must be logged in to vote

OK, it seems like adding one line suffice to solve my problem:

def setup_class(request):
    tester=request.config.getoption("--tester")
    dir ='/dataset/lidar'
    tester=tester.split('.')[0]
    with open(dir+'/result/'+tester+'.pcd.json','r',encoding='utf8')as f:
        test=json.load(f)
    with open(dir+'/gt/'+tester+'.json','r',encoding='utf8')as f:
        standard=json.load(f)
    return test, standard

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@RonnyPfannschmidt
Comment options

@GeJintian
Comment options

@RonnyPfannschmidt
Comment options

Answer selected by GeJintian
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants