Пример #1
0
 def test_current_version_in_latest_env(self) -> None:
     with temporary_root() as root:
         os.makedirs(env.base_dir(root))
         with open(
                 os.path.join(env.base_dir(root), env.VERSION_FILENAME),
                 "w",
                 encoding="utf-8",
         ) as f:
             f.write(__version__)
         self.assertEqual(__version__, env.current_version(root))
         self.assertEqual("nutmeg", env.get_env_release(root))
         self.assertIsNone(env.should_upgrade_from_release(root))
         self.assertTrue(env.is_up_to_date(root))
Пример #2
0
 def test_current_version_in_empty_env(self) -> None:
     with temporary_root() as root:
         self.assertIsNone(env.current_version(root))
         self.assertIsNone(env.get_env_release(root))
         self.assertIsNone(env.should_upgrade_from_release(root))
         self.assertTrue(env.is_up_to_date(root))