import unittest

import i18n

class TestFileLoader(unittest.TestCase):
    def test_dummy(self):
        self.assertTrue(hasattr(i18n, 'resource_loader'))

suite = unittest.TestLoader().loadTestsFromTestCase(TestFileLoader)
unittest.TextTestRunner(verbosity=2).run(suite)

import unittest

from i18n import resource_loader

class TestFileLoader(unittest.TestCase):
    def test_nonexisting_extension(self):
        self.assertRaises(resource_loader.I18nFileLoadError, resource_loader.load_resource, "foo.bar")


suite = unittest.TestLoader().loadTestsFromTestCase(TestFileLoader)
unittest.TextTestRunner(verbosity=2).run(suite)

Add test for nonexisting file extensions.
Add test for nonexisting file extensions.

  import unittest
  
- import i18n
+ from i18n import resource_loader
  
  class TestFileLoader(unittest.TestCase):
-     def test_dummy(self):
-         self.assertTrue(hasattr(i18n, 'resource_loader'))
+     def test_nonexisting_extension(self):
+         self.assertRaises(resource_loader.I18nFileLoadError, resource_loader.load_resource, "foo.bar")
+ 
  
  suite = unittest.TestLoader().loadTestsFromTestCase(TestFileLoader)
  unittest.TextTestRunner(verbosity=2).run(suite)
  
Add test for nonexisting file extensions.
## Code Before:
import unittest

import i18n

class TestFileLoader(unittest.TestCase):
    def test_dummy(self):
        self.assertTrue(hasattr(i18n, 'resource_loader'))

suite = unittest.TestLoader().loadTestsFromTestCase(TestFileLoader)
unittest.TextTestRunner(verbosity=2).run(suite)

## Instruction:
Add test for nonexisting file extensions.
## Code After:
import unittest

from i18n import resource_loader

class TestFileLoader(unittest.TestCase):
    def test_nonexisting_extension(self):
        self.assertRaises(resource_loader.I18nFileLoadError, resource_loader.load_resource, "foo.bar")


suite = unittest.TestLoader().loadTestsFromTestCase(TestFileLoader)
unittest.TextTestRunner(verbosity=2).run(suite)
