21 lines
631 B
Python
21 lines
631 B
Python
import sys, os
|
|
sys.path.insert(0, os.path.dirname(__file__))
|
|
from min_window_substring import min_window
|
|
|
|
def test_basic():
|
|
assert min_window("ADOBECODEBANC", "ABC") == "BANC"
|
|
def test_a():
|
|
assert min_window("a", "a") == "a"
|
|
def test_no():
|
|
assert min_window("a", "aa") == ""
|
|
def test_empty_t():
|
|
assert min_window("abc", "") == ""
|
|
def test_empty_s():
|
|
assert min_window("", "a") == ""
|
|
def test_dup_t():
|
|
assert min_window("aa", "aa") == "aa"
|
|
def test_unicode():
|
|
assert min_window("a\u00e9b\u00e9c", "\u00e9\u00e9") == "\u00e9b\u00e9"
|
|
def test_single_char_missing():
|
|
assert min_window("abc", "d") == ""
|