merged in default ENGINE-289
authorKrista Bennett <krista@pep-project.org>
Wed, 10 Jan 2018 16:19:44 +0100
branchENGINE-289
changeset 237216dc3caf2156
parent 2371 05c495924fde
parent 2367 bc21bd3fd514
child 2380 2f2e818484a0
child 2385 974de9c65cbb
merged in default
     1.1 --- a/test/python_tests/conftest.py	Wed Jan 10 16:19:07 2018 +0100
     1.2 +++ b/test/python_tests/conftest.py	Wed Jan 10 16:19:44 2018 +0100
     1.3 @@ -8,5 +8,7 @@
     1.4  
     1.5  
     1.6  def pytest_runtest_setup(item):
     1.7 -    create_homes()
     1.8 -
     1.9 +    try:
    1.10 +        create_homes()
    1.11 +    except FileExistsError: # if concurrent process is already creating things
    1.12 +        pass
     2.1 --- a/test/python_tests/setup_test.py	Wed Jan 10 16:19:07 2018 +0100
     2.2 +++ b/test/python_tests/setup_test.py	Wed Jan 10 16:19:44 2018 +0100
     2.3 @@ -84,9 +84,11 @@
     2.4  
     2.5      try:
     2.6          os.stat("test1")
     2.7 -    except:
     2.8 +    except FileNotFoundError:
     2.9          create_home(mydir, "test1", "Alice One")
    2.10          create_home(mydir, "test2", "Bob Two")
    2.11 +        os.chdir(mydir);
    2.12 +        os.makedirs("common", exist_ok=True) # common inbox for Sync tests
    2.13      else:
    2.14          while True:
    2.15              try:
    2.16 @@ -104,6 +106,7 @@
    2.17      os.chdir(mydir)
    2.18      shutil.rmtree("test1", ignore_errors=True)
    2.19      shutil.rmtree("test2", ignore_errors=True)
    2.20 +    shutil.rmtree("common", ignore_errors=True)
    2.21      shutil.rmtree("__pycache__", ignore_errors=True)
    2.22  
    2.23