from project_generator.util import *

def test_unicode_detection():
    try:
        print(u'\U0001F648')
    except UnicodeEncodeError:
        assert not unicode_available()
    else:
        assert unicode_available()

def test_flatten():
    l1 = [['aa', 'bb', ['cc', 'dd', 'ee'], ['ee', 'ff'], 'gg']]

    assert list(flatten(l1)) == ['aa', 'bb', 'cc', 'dd', 'ee', 'ee', 'ff', 'gg']
    assert uniqify(flatten(l1)) == ['aa', 'bb', 'cc', 'dd', 'ee', 'ff', 'gg']

def test_uniqify():
    l1 = ['a', 'b', 'b', 'c', 'b', 'd', 'c', 'e', 'f', 'a']
    assert uniqify(l1) == ['a', 'b', 'c', 'd', 'e', 'f']

from project_generator.util import *

def test_flatten():
    l1 = [['aa', 'bb', ['cc', 'dd', 'ee'], ['ee', 'ff'], 'gg']]

    assert list(flatten(l1)) == ['aa', 'bb', 'cc', 'dd', 'ee', 'ee', 'ff', 'gg']
    assert uniqify(flatten(l1)) == ['aa', 'bb', 'cc', 'dd', 'ee', 'ff', 'gg']

def test_uniqify():
    l1 = ['a', 'b', 'b', 'c', 'b', 'd', 'c', 'e', 'f', 'a']
    assert uniqify(l1) == ['a', 'b', 'c', 'd', 'e', 'f']

Test util - unicode removal
Test util - unicode removal

  from project_generator.util import *
- 
- def test_unicode_detection():
-     try:
-         print(u'\U0001F648')
-     except UnicodeEncodeError:
-         assert not unicode_available()
-     else:
-         assert unicode_available()
  
  def test_flatten():
      l1 = [['aa', 'bb', ['cc', 'dd', 'ee'], ['ee', 'ff'], 'gg']]
  
      assert list(flatten(l1)) == ['aa', 'bb', 'cc', 'dd', 'ee', 'ee', 'ff', 'gg']
      assert uniqify(flatten(l1)) == ['aa', 'bb', 'cc', 'dd', 'ee', 'ff', 'gg']
  
  def test_uniqify():
      l1 = ['a', 'b', 'b', 'c', 'b', 'd', 'c', 'e', 'f', 'a']
      assert uniqify(l1) == ['a', 'b', 'c', 'd', 'e', 'f']
  
Test util - unicode removal
## Code Before:
from project_generator.util import *

def test_unicode_detection():
    try:
        print(u'\U0001F648')
    except UnicodeEncodeError:
        assert not unicode_available()
    else:
        assert unicode_available()

def test_flatten():
    l1 = [['aa', 'bb', ['cc', 'dd', 'ee'], ['ee', 'ff'], 'gg']]

    assert list(flatten(l1)) == ['aa', 'bb', 'cc', 'dd', 'ee', 'ee', 'ff', 'gg']
    assert uniqify(flatten(l1)) == ['aa', 'bb', 'cc', 'dd', 'ee', 'ff', 'gg']

def test_uniqify():
    l1 = ['a', 'b', 'b', 'c', 'b', 'd', 'c', 'e', 'f', 'a']
    assert uniqify(l1) == ['a', 'b', 'c', 'd', 'e', 'f']

## Instruction:
Test util - unicode removal
## Code After:
from project_generator.util import *

def test_flatten():
    l1 = [['aa', 'bb', ['cc', 'dd', 'ee'], ['ee', 'ff'], 'gg']]

    assert list(flatten(l1)) == ['aa', 'bb', 'cc', 'dd', 'ee', 'ee', 'ff', 'gg']
    assert uniqify(flatten(l1)) == ['aa', 'bb', 'cc', 'dd', 'ee', 'ff', 'gg']

def test_uniqify():
    l1 = ['a', 'b', 'b', 'c', 'b', 'd', 'c', 'e', 'f', 'a']
    assert uniqify(l1) == ['a', 'b', 'c', 'd', 'e', 'f']
