def test_runtests_find_cases_glob(self):
     _make_empty_files(self.cases_dir)
     find_files = (
         'test_a_real_test.py',
         'test_a_real_test2.py',
     )
     found = runtests.find_cases(('test_a_real_test*', ), self.cases_dir)
     self.assertSetEqual(set(find_files), found)
     found = runtests.find_cases(('test_a_real_test*.py', ), self.cases_dir)
     self.assertSetEqual(set(find_files), found)
     found = runtests.find_cases(('*_a_real_test*', ), self.cases_dir)
     self.assertSetEqual(set(find_files), found)
 def test_runtests_find_cases_single_name(self):
     _make_empty_files(self.cases_dir)
     find_files = (
         'test_a_real_test.py',
     )
     found = runtests.find_cases(find_files, self.cases_dir)
     self.assertSetEqual(set(find_files), found)
 def test_runtests_find_cases_none_found(self):
     _make_empty_files(self.cases_dir)
     args = ('xNOMATCHx',)
     matches = []
     found = runtests.find_cases(args, self.cases_dir)
     self.assertItemsEqual(matches, found)
     self.assertEqual(len(found), 0)
    def test_runtests_find_cases_glob(self):
        _make_empty_files(self.cases_dir)
        matches = (
            'test_a_real_test.py',
            'test_a_real_test2.py',
        )

        args = (
            'test_a_real_test*',
        )
        found = runtests.find_cases(args, self.cases_dir)
        self.assertItemsEqual(matches, found)

        args = (
            'test_*_test*',
        )
        found = runtests.find_cases(args, self.cases_dir)
        self.assertItemsEqual(matches, found)
 def test_runtests_find_cases_single_name(self):
     _make_empty_files(self.cases_dir)
     args = (
         'test_a_real_test',
     )
     matches = (
         'test_a_real_test.py',
     )
     found = runtests.find_cases(args, self.cases_dir)
     self.assertItemsEqual(matches, found)
 def test_runtests_find_cases_none_found(self):
     _make_empty_files(self.cases_dir)
     find_files = []
     found = runtests.find_cases(('xNOMATCHx', ), self.cases_dir)
     self.assertSetEqual(set(find_files), found)
     self.assertEqual(len(found), 0)