Exemple #1
0
 def test_find_files(self):
     plugin = FindFilePlugin()
     plugin.installed(self.test_project_dir,
                      self.spec, self.sack)
     files = [('/patch/0.patch', None, None),
              ('/patch/1.patch', None, None),
              ('/patch/2.patch', None, None),
              ('/c/sourcecode.c', None, None),
              ('/hello_project/hello-1.4.tar.gz', None, None),
              ('/py/plugin0.py', None, None),
              ('/py/sourcecode.py', None, None),
              ('/translation/CZ.mo', None, None),
              ('/libs/libstatic.a', None, None),
              ('/libs/libdynamic.so.1', None, None),
              ('/archives/sample.tar.gz', None, None),
              ('/archives/sample.tar.xz', None, None),
              ('/Makefile', None, None),
              ('/py/requires/sourcecode2.py', None, None)]
     excludes = [('/patch/__pycache__/', r'%exclude', None),
                 ('/c/__pycache__/', r'%exclude', None),
                 ('/hello_project/__pycache__/', r'%exclude', None),
                 ('/py/__pycache__/', r'%exclude', None),
                 ('/py/requires/__pycache__/', r'%exclude', None),
                 ('/translation/__pycache__/', r'%exclude', None),
                 ('/libs/__pycache__/', r'%exclude', None),
                 ('/archives/__pycache__/', r'%exclude', None),
                 ('/__pycache__/', r'%exclude', None)]
     sorted_files = sorted(files + excludes, key=lambda e: e[0])
     self.assertEqual(self.spec.files,
                      sorted_files)
Exemple #2
0
 def test_find_files(self):
     plugin = FindFilePlugin()
     plugin.installed(self.test_project_dir / "setuptools", self.spec,
                      self.sack)
     files = sorted([("/setup.py", None, None),
                     ("/testscript.py", None, None)])
     self.assertEqual(sorted(list(self.spec.files)), files)
Exemple #3
0
 def test_find_files(self):
     plugin = FindFilePlugin()
     plugin.installed(self.test_project_dir / "setuptools",
                      self.spec, self.sack)
     files = sorted([
         ("/setup.py", None, None),
         ("/testscript.py", None, None)
     ])
     self.assertEqual(sorted(list(self.spec.files)),
                      files)
Exemple #4
0
 def test_find_files(self):
     plugin = FindFilePlugin()
     plugin.installed(self.test_project_dir, self.spec, self.sack)
     files = [('tests/project/patch/0.patch', None, None),
              ('tests/project/patch/1.patch', None, None),
              ('tests/project/patch/2.patch', None, None),
              ('tests/project/c/sourcecode.c', None, None),
              ('tests/project/py/plugin0.py', None, None),
              ('tests/project/py/sourcecode.py', None, None),
              ('tests/project/translation/CZ.mo', None, None),
              ('tests/project/libs/libstatic.a', None, None),
              ('tests/project/libs/libdynamic.so.1', None, None)]
     sorted_files = sorted(files, key=lambda e: e[0])
     self.assertEqual(self.spec.files.append.call_args_list,
                      [mock.call(sorted_files)])
Exemple #5
0
 def test_find_files(self):
     plugin = FindFilePlugin()
     plugin.installed(self.test_project_dir,
                      self.spec, self.sack)
     files = [('tests/project/patch/0.patch', None, None),
              ('tests/project/patch/1.patch', None, None),
              ('tests/project/patch/2.patch', None, None),
              ('tests/project/c/sourcecode.c', None, None),
              ('tests/project/py/plugin0.py', None, None),
              ('tests/project/py/sourcecode.py', None, None),
              ('tests/project/translation/CZ.mo', None, None),
              ('tests/project/libs/libstatic.a', None, None),
              ('tests/project/libs/libdynamic.so.1', None, None)]
     sorted_files = sorted(files, key=lambda e: e[0])
     self.assertEqual(self.spec.files.append.call_args_list,
                      [mock.call(sorted_files)])
Exemple #6
0
 def test_find_files(self):
     plugin = FindFilePlugin()
     plugin.installed(self.test_project_dir,
                      self.spec, self.sack)
     files = [('/patch/0.patch', None, None),
              ('/patch/1.patch', None, None),
              ('/patch/2.patch', None, None),
              ('/c/sourcecode.c', None, None),
              ('/hello_project/hello-1.4.tar.gz', None, None),
              ('/py/plugin0.py', None, None),
              ('/py/sourcecode.py', None, None),
              ('/translation/CZ.mo', None, None),
              ('/libs/libstatic.a', None, None),
              ('/libs/libdynamic.so.1', None, None),
              ('/srpm/test.src.rpm', None, None),
              ('/srpm/fail.src.rpm', None, None),
              ('/archives/sample.tar.gz', None, None),
              ('/archives/sample.tar.xz', None, None),
              ('/archives/rpg-0.0.2-1.tar.gz', None, None),
              ('/Makefile', None, None),
              ('/py/requires/sourcecode2.py', None, None),
              ('/mock_project/mock-1.0.tar.gz', None, None),
              ('/c/CMakeCache.txt', None, None),
              ('/c/CMakeLists.txt', None, None),
              ('/setuptools/setup.py', None, None),
              ('/setuptools/testscript.py', None, None),
              ('/autotools/configure.ac', None, None),
              ('/autotools/Makefile.am', None, None)]
     excludes = [('/patch/__pycache__/', r'%exclude', None),
                 ('/c/__pycache__/', r'%exclude', None),
                 ('/hello_project/__pycache__/', r'%exclude', None),
                 ('/py/__pycache__/', r'%exclude', None),
                 ('/py/requires/__pycache__/', r'%exclude', None),
                 ('/translation/__pycache__/', r'%exclude', None),
                 ('/libs/__pycache__/', r'%exclude', None),
                 ('/archives/__pycache__/', r'%exclude', None),
                 ('/__pycache__/', r'%exclude', None),
                 ('/srpm/__pycache__/', '%exclude', None),
                 ('/mock_project/__pycache__/', '%exclude', None),
                 ('/setuptools/__pycache__/', '%exclude', None),
                 ('/autotools/__pycache__/', '%exclude', None)]
     sorted_files = sorted(files + excludes, key=lambda e: e[0])
     self.assertEqual(sorted(list(self.spec.files)),
                      sorted_files)