
import UM.Settings

def test_container_stack():
    stack = UM.Settings.ContainerStack()


import pytest
import uuid # For creating unique ID's for each container stack.

import UM.Settings

##  Creates a brand new container stack to test with.
#
#   The container stack will get a new, unique ID.
@pytest.fixture
def container_stack():
    return UM.Settings.ContainerStack(uuid.uuid4().int)

def test_container_stack(container_stack):
    assert container_stack != None


Test creating container stack with fixture
Test creating container stack with fixture

The fixture will automatically generate a unique ID.

Contributes to issue CURA-1278.

+ 
+ import pytest
+ import uuid # For creating unique ID's for each container stack.
  
  import UM.Settings
  
+ ##  Creates a brand new container stack to test with.
+ #
+ #   The container stack will get a new, unique ID.
+ @pytest.fixture
- def test_container_stack():
+ def container_stack():
-     stack = UM.Settings.ContainerStack()
+     return UM.Settings.ContainerStack(uuid.uuid4().int)
  
+ def test_container_stack(container_stack):
+     assert container_stack != None
+ 
+ 
Test creating container stack with fixture
## Code Before:

import UM.Settings

def test_container_stack():
    stack = UM.Settings.ContainerStack()

## Instruction:
Test creating container stack with fixture
## Code After:

import pytest
import uuid # For creating unique ID's for each container stack.

import UM.Settings

##  Creates a brand new container stack to test with.
#
#   The container stack will get a new, unique ID.
@pytest.fixture
def container_stack():
    return UM.Settings.ContainerStack(uuid.uuid4().int)

def test_container_stack(container_stack):
    assert container_stack != None

